Sound can travel through any medium, so long as there are sufficient particles in each cubic metre to allow the to and fro motion of one block of particles to be passed on to their neighbours.
Solids, liquids and gases differ in the arrangements of their particles and in the forces between the particles. So you might expect variations in both the speed and range of sounds travelling through them, since both depend on how the disturbance passes on from one block of particles to the next.
Sounds travel faster and further in solids. Presumably this fact must have been well known to all of those who put their ear to a rail track to detect whether or not a train was coming.
In liquids sounds also travel over great distances at considerable speed. This is apparent from listening to whales as they communicate with one another. The complexity of the paths which these vibrations follow is exploited by Tom Clancy in his book
The Hunt for Red October, where he makes much of the difficulties involved in interpreting sonar signals while tracking submarines.
In deep space there are only about 3 particles of hydrogen per cubic metre and this is not enough to sustain a sound. Disappointingly the
booms of space movies are a fiction! All explosions in outer space take place in eerie silence. As the
Alien movie tells us:
In space, no-one can hear you scream.
The speed of sound varies in different media. Here are some typical examples: in air, 340 m/s ; in water, 1500 m/s ; in steel, 6000 m/s.
All around you there is plenty of evidence that different frequencies of sound travel at the same speed. The very existence of music depends on this. If the notes of differing frequencies, from different instruments, arrived at your ears all at different points in time, the effects would probably be rather unpleasant!