Pressure equalization from Earth’s interior
The heart of an active volcano is a chamber of molten rock, or magma. An eruption begins, when the pressure in the chamber is so intense that the magma is forced towards the surface, where it will typically dart out of the crater.
The molten rock is up to 1,200 °C hot, as it flows out of the volcano. When the magma reaches Earth's surface, it is cooled.
The flow stops, when the magma has cooled to about. 800 °C. Hardened magma is known as lava. It is often porous due to small pockets, from which the gas of the magma escaped.
Magma shoots out of the volcano crater due to the high pressure from the underground. Small balls of fire (volcanic bombs) fly in all directions.