As the plates move they put forces on themselves and each other. When the force is large enough, the crust is forced to break. When the break occurs, the stress is released as energy which moves through the Earth in the form of waves, which we feel and call an earthquake.