Sound travels at about 340 meters per second through air under ordinary room conditions. That is roughly 1,225 kilometres per hour, or about 767 miles per hour, though the exact value changes with temperature and the material carrying the sound.
At 20°C, the speed of sound in dry air is approximately 343 metres per second. At colder temperatures it is slower, and at warmer temperatures it is faster. Humidity also has a smaller effect. The familiar value of 340 m/s is therefore a useful rounded estimate rather than a universal constant.
Sound is a mechanical wave, so it needs matter—such as air, water, or metal—to travel. It cannot move through a vacuum. In general, sound travels faster through liquids and solids than through air because their particles interact more strongly.
This difference explains why lightning appears before thunder: light reaches us almost instantly compared with sound. For a rough estimate, each three seconds between the flash and thunder represents about one kilometre of distance.