At the margins of the Earth’s plates, where two plates pull apart or one plate dives beneath another, magma (molten underground rock) frequently rises to the surface through volcanic vents. The molten rock, now called lava, cools and hardens, forming new rock.