Where these molten lavas reach the surface they become volcanoes. The Pacific Ocean is surrounded by volcanoes all around its edge. This is called the Pacific Ring of Fire. It exists because the Pacific Ocean sits on a tectonic plate called the Pacific Plate. The edges of the Pacific Plate are going underneath into the mantle all the way around, leading to a chain of volcanoes all the way around.
Some tectonic plates run into one another, while others are moving apart.
Where two plates move apart the gap is filled by a mid-ocean ridge, which is where new magma comes to the surface and makes new ocean crust. Mid-ocean ridges are like huge underwater mountain chains, and the new magma rising up to fill the gap actually helps to push the plates apart. Sometimes the new hot magma builds up high enough to reach the top of the ocean, and where this happens an island forms. Other sorts of volcanoes occur where one of the tectonic plates sits above what we call a hot-spot . A hot-spot is a large plume of hot molten magma that rises from the mantle up to the surface.