The speed of a sound wave depends on what type of medium it is traveling through, and if that medium is a gas or liquid, a significant change in temperature can also affect its speed. In air, the speed at which sound travels is about 1 mile every 5 seconds at 32 degrees Fahrenheit, but the speed of a sound wave traveling through solid rock is about 18 miles every 5 seconds. Sound travels faster through a solid substance like rock because, unlike liquids or gases, the molecules in a solid are held close together.
A sound wave is a compression wave that transfers energy from one molecule to the next as it travels through a medium. Unlike electromagnetic waves, sound waves must have a medium to travel through and cannot propagate across a vacuum. While sounds waves are propagating, they can be attenuated, refracted or reflected by the type of medium they travel through or encounter. The physical properties of the medium will determine the manner in which sound waves are affected.