The Earth’s crust is made up of about 30 huge plates, called tectonic plates, that float 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 earthquake take place are along the edges of these plates. Friction holds the plate edges together for a while, but continuing movement means that huge stresses build up. The tension is suddenly released when the plates shift sharply, but this causes an Earthquake.
There are other causes of Earthquakes, but they all involve sudden movement of the crust along a fault or crack.