A volcano forms when magma from deep inside the Earth rises up through cracks in the Earth's crust. Over time, the magma builds up in a chamber beneath the surface. When the pressure becomes too great, the magma forces its way through the surface, erupting as lava. The eruption can also release gas, ash and rocks into the air.