An earthquake occurs when the movement and breaking of rock masses happen on pre-existing faults. Once an earthquake hits, energy is created through seismic waves that travel through the Earth's crust.
Seismic waves transport energy though different areas. Seismic waves are physical waves that have many different parts. The crest is the high point of the wave, while the trough is the low point. The distance that is between the crests or troughs is the wavelength. The wave height represents the vertical distance that is from the undisturbed surface to the wave crest. Typically, the bigger the waves are, the more energy they provide. The large waves are steep and have a unique shape.
The ground shakes during an earthquake due to the energy from the waves. The closer it gets to the epicenter, the more the ground shakes. Once the seismic energy makes its way through the rocks, the energy will then dissipate. The waves move at various speeds depending on the size of the waves. At the epicenter, all the waves are created there at roughly the same time, which makes the ground shake very abruptly for a small amount of time. The waves that are created by the earthquake are measured and recorded by a seismograph.