Like the rest of the Earth, the ocean floor is divided into tectonic plates. The movement of these plates is responsible for features like ridges, trenches, and valleys. Ridges are formed when two plates drift apart. Boiling rock from inside the Earth, called magma, oozes out through the cracks between the plates and cools to form a ridge. Trenches are formed when a heavier plate sinks down under a lighter one.