The crust is broken into plates. The convection currents in the magma cause the tectonic plates to move in different directions and collide against each other.
Where plates converge, one plate is drawn slowly beneath the other.
Where plates collide, rock layers are forced upwards, creating mountains. That’s how Himalayas were formed.
Other plates move slowly alongside each other. Faults are found at the edges where the crust is moving in different directions.
In some places, the plates get locked together. Energy builds up in the locked plates. Over the time, it is released in the form of an earthquake.
Surface waves radiate outward from the epicentre and cause the damage.