The molecules of air are much further apart than the molecules in a liquid. A sound wave therefore travels more slowly in the loosely packed air than it does in a much more tightly packed liquid. Sound waves also travel further in liquids and solids than they do in air.
The nature of the medium is a major factor in the speed of a wave. For example, if you make a wave on a string stretched loosely across a classroom, you will see the wave travel down the string. If you tighten the string the wave will move down the string faster. Tightness or stiffness of the string influences the speed.
Note: There is no sound on this video.