P-waves are a type of elastic wave, also called seismic waves, that can travel through gas
Gas is one of the three classical states of matter . Near absolute zero, a substance exists as a solid. As heat is added to this substance it melts into a liquid at its melting point , boils into a gas at its boiling point, and if heated high enough would enter a plasma state in which the electrons...

es (as sound
Sound is a mechanical wave that is an oscillation of pressure transmitted through a solid, liquid, or gas, composed of frequencies within the range of hearing and of a level sufficiently strong to be heard, or the sensation stimulated in organs of hearing by such vibrations.-Propagation of...

 waves), solids and liquids, including the Earth
Earth is the third planet from the Sun, and the densest and fifth-largest of the eight planets in the Solar System. It is also the largest of the Solar System's four terrestrial planets...

. P-waves are produced by earthquakes and recorded by seismographs
Seismometers are instruments that measure motions of the ground, including those of seismic waves generated by earthquakes, volcanic eruptions, and other seismic sources...

. The name P-wave is often mistakenly said to stand either for primary wave, as it has the highest velocity and is therefore the first to be recorded; or pressure wave, as it is formed from alternating compressions and rarefaction
Rarefaction is the reduction of a medium's density, or the opposite of compression.A natural example of this is as a phase in a sound wave or phonon. Half of a sound wave is made up of the compression of the medium, and the other half is the decompression or rarefaction of the medium.Another...