Volcanoes erupt when molten rock called magma rises to the surface. ... Runny magma erupts through openings or vents in the earth's crust before flowing onto its surface as lava. If magma is thick, gas bubbles cannot easily escape and pressure builds up as the magma rises.