An earthquake is caused by a sudden slip on a fault. Thetectonic plates are always slowly moving, but they get stuck at their edges due to friction. When thestress on the edge overcomes the friction, there is an earthquake that releases energy in waves that travel through the earth's crust and cause the shaking that we feel.