Whenever the earth is suddenly struck or disturbed due to earthquake vibration are produced. These vibrations are setup or start from a limited area and are propagated outward in all directions. Thus an earthquake may be defined as the passage of these vibrations in the earth.
when P-waves and S-waves reach the earth's surface, most of their energy is reflected back. Some of the energy is returned back to the surface by reflections at different layers of soil and rock. Shaking is more severe (about twice as much) at the earth's surface than at substantial depths. This is often the basis for designing structures buried underground for similar levels of acceleration than those above the ground.