Volcanoes erupt when molten rock called magma rises to the surface. Magma is formed when the earth's mantle melts. ... Another way an eruption happens is when water underneath the surface interacts with hot magma and creates steam, this can build up enough pressure to cause an explosion.