When it's beneath the surface, the molten rock is called magma. When it reaches the surface, it erupts as lava, ash and volcanic rocks. With each eruption, rocks, lava and ash build up around the volcanic vent. The nature of the eruption depends on the viscosity of the magma.