A sudden motion or trembling in the Earth caused by the abrupt release of slowly accumulated strain. That's how the American Geological Institute Glossary of Geology defines one.
Most earthquakes occur along faults, or breaks, in the Earth's crust.
The San Andreas fault in California is the one that we're all familiar with, but there are millions of faults all over the earth, including many right here in New Mexico. The largest faults occur along the edges of the huge tectonic plates that comprise the Earth's crust, and move slowly about, grinding against each other. Energy is stored up as the plates push against each other, and then suddenly released as an earthquake when the strength of the Earth is exceeded. Try slowly bending a plastic ruler or twig with one hand while you hold it firmly with the other. If you let go, there will be a sudden release of stored energy, just as in an earthquake.