Waves travel fastest in a medium with high elasticity and low density. Solids have the highest elasticity, followed by liquids and then gases. Solids also have the lowest density, followed by liquids and then gases. Therefore, waves travel fastest in solids, followed by liquids and then gases.
For example, sound waves travel at about 343 m/s in air at room temperature, 1,500 m/s in water, and 5,120 m/s in steel.