During the earthquakes the vibration produce the waves known as seismic waves, there are two types of seismic waves, surface waves and body waves.
Body waves travel through the inner surface, while the surface wave travel along the surface, therefore the vibration produced during the earthquakes travel both along, and through the surface of the earth.