Earthquakes occur when there is a sudden release of energy in the Earth's crust, typically as a result of tectonic plate movements. The Earth's outer layer is divided into several large pieces called tectonic plates, which are constantly moving. When these plates grind against each other or slide past one another, it can create stress that builds up over time. When this stress becomes too great, it is released in the form of seismic waves, causing the ground to shake - this is what we feel as an earthquake.