Earthquakes are usually caused when rock underground suddenly breaks along a fault. This sudden release of energy causes the seismic waves that make the ground shake. When two blocks of rock or two plates are rubbing against each other, they stick a little. They don't just slide smoothly; the rocks catch on each other. The rocks are still pushing against each other, but not moving. After a while, the rocks break because of all the pressure that's built up. When the rocks break, the earthquake occurs.
When the rocks underground break. It produces seismic waves which makes ground shake which results in earthquake