What is the science behind earthquakes?

The Earth's crust is composed of large plates, which sometimes move. When the plates move, the ground moves.