Volcanoes erupt when molten rock called magma rises to the surface. Magma is formed when the earth's mantle melts. Melting may happen where tectonic plates are pulling apart or where one plate is pushed down under another. This isn’t the whole word by word, but it’s very close.