Gas
At high pressure deep within the Earth's crust, the percentage of gas present in molten rock is higher than it is when the molten rock is at the surface. As magma gets closer to the surface, the pressure lessens and the water separates from the molten rock to form bubbles. These expanding gas bubbles cause the molten rock to take up more space, which pushes the molten rock closer to the surface. The closer the molten rock gets to the surface, the faster the water bubbles. Eventually, the surrounding space is not adequate enough to contain the expanding gas bubbles as well as the molten rock and it explodes, according to Scientific American.
Pressure
When silicate rock melts deep within the Earth's surface, the mass of the rock remains the same but the rock's volume increases. The molten rock becomes less dense than the surrounding solid rock. The pressure imbalance between the less dense material and the denser material forces the molten rock up toward the surface, according to Scientific American. The molten rock continues to rise toward the surface until this pressure is released at the surface level.
Magma
Volcanoes have magma chambers that store large amounts of molten rock within the volcano. When new molten rock is added to the chamber, it increases the volume in the chamber and pushes some of the molten rock up toward the surface through vents. The more molten rock added to the chamber, the more the molten rock rises to the surface. Eventually the magma chamber and vents can't contain anymore molten rock and it rises to the surface, causing the volcano to erupt.
Locations of Molten Rock Explosions
Molten rock explosions happen in places where the molten rock can actually reach the surface and release pressure. Such places include fissures and volcanoes. Volcanoes are an opening or rupture in the Earth's surface. They typically form in places where tectonic plates collide or pull apart. Volcanoes often have a main vent with many side vents extending down into a magma chamber below. Fissures are cracks formed in the Earth's surface due to the Earth's tectonic plates pulling away from each other. If a fissure forms over a reservoir of molten rock, the molten rock may reach the surface. These fissures sometimes form near volcanoes and occasionally become volcanoes when molten lava escapes and cools around the fissure, forming a mountain-like structure.