The Earth's crust is made up of about 30 huge plates called tectonic plates that flow on the semi-liquid mantle surrounding the Earth's core
There are currents and movements in the mantle, so these plates move very slowly in relation to each other.
Earthquakes are evidence of this movement. Most of the areas where earthquakes take place are along the edges of these plates.
Friction holds the edges together for a while, but continuous movement means that huge stresses build up. The tension is suddenly released when the plates shift sharply, this causes an earthquake.
There are other causes of earthquakes, but they all involve sudden movement of the crust along a fault or a crack.
Credit - Tell Me More