The speed of sound is influenced by several factors, including medium, density and temperature. The rate at which sound waves moves varies widely from one situation to the next and can change dramatically in a short period of time.
Sound waves are considered to be longitudinal waves, which means that particles in the air surrounding these waves move in parallel motion to the waves. An example is the movement of a guitar string, which moves rapidly from side to side when plucked. In a neutral or unmoving state, the guitar string is surrounded by an equal number of air particles on all sides. Like a rock, leaf or insect that penetrates the surface of a placid lake or pond, however, the creation of movement in the guitar string disturbs the surrounding air particles and creates movement. When stimulated by the string, particles may move closer together or farther apart.
The substance through which sound travels is called the medium, and sound moves best through air and water. The density of the medium affects the speed of sound. In the case of air, humidity, density, temperature, and moisture can affect air density and in turn affect the speed of sound. On a muggy day, for example, sound travels slower because humidity makes the air more dense.