Earthquakes are caused by the movement of rock beneath the Earth's surface, originating from a focus point and manifesting on the surface at the epicenter. Seismic waves, which travel through the Earth and carry energy from the earthquake, come in three main types: primary waves (P-waves), secondary waves (S-waves), and surface waves, with P-waves being the first to arrive. Earthquake magnitudes are measured using the Mercalli and Richter scales, which assess damage levels and seismic wave sizes respectively.