The fastest waves that compress and expand the ground like an accordion are primary waves (P-waves). These seismic waves are the first to arrive after an earthquake and travel through solids, liquids, and gases. They cause particles in the ground to move in the same direction as the wave itself, resulting in the compressional and expansion effects.
Seismicwaves in the earth can produce a sort of mapping, this is because when seismic waves from an earthquake are produced in North America there is no earth quake in china, therefore there must be some sort of liquid in the earth. That would be the liquid part of the outer core the inner core is very solid the mantle is also solid, and the crust is what you walk on.