When an object vibrates, it produces sound. Sound can only travel through a medium (e.g. a solid, liquid or gas).
Sound waves are longitudinal, which means the vibrations are parallel to the direction of wave travel. This is why sound waves show periods of compression and rarefaction.
Sound travels at different speeds, depending on the medium. Even though sound travels very fast, it is still possible to measure the speed of sound over a given distance, which is measured in metres per second (m/s).
As sound waves travel through a medium, they travel faster in media with particles that are closer together. As you can see in the list above, sound travels fastest in solids, then liquids and then slowest in gases. This is because the particles of solids are closest together, then liquids and then furthest apart in gases.
When sound travels in a solid, the particles are very close together. So as the particles collide, they can transfer energy much quicker than liquids and gases.
The speed of sound waves also depends on the density of the object. The more dense an object is, the faster sound will travel through it.
Sound waves travel through the vibration of particles. In fact, sound is actually just vibrating air. As space has no air to vibrate, there is no sound in space.