The Earth's crust is made of tectonic plates. These plates are constantly in motion. How are earthquakes related to the movement of tectonic plates?

A.
Two plates collide and the edges of the plate begin to crumble.
B.
Tectonic plates move against each other and release energy into the surface of the Earth.
C.
Gravity pulls down large amounts of soil on Earth's surface causing the plates to shake.
D.
Magma pushes a tectonic plate upward from under the surface of the Earth.