Earth is not a uniformly solid sphere from inside and there are many faults along the planes inside the earth. During its rotation and revolution, rocks break and slip along faults. This movement of rocks along a fault releases enormous amount of energy in the form of seismic waves that have the potential to shake the ground violently. This shaking and tremor causes buildings to collapse, resulting in heavy loss of property and innocent lives.
As described above, the structure underneath the surface of earth is made up of tectonic plates that keep sliding and striking against each other. This causes release of energy that violently shakes up ground. Shaking of ground causes untold damage above the epicenter of this earthquake and this shaking or tremor decrease in amplitude and magnitude with increasing distance from the epicenter of the earthquake.
Contrary to common misconception because of some Hollywood movies, there is no tearing up of ground though there may be some cracks that show up on the surface. It is just the tremor that causes all the destruction. The earth has been divided into seismic zones based upon their seismicity or the frequency with which they have experienced tremors in the past.