Various factors trigger a volcanic eruption. The three predominant factors are the magma's buoyancy, the pressure from the gases that separate in the magma and the merger of a new batch of magma with a chamber already filled with magma.
The melting of rock inside the earth produces a melt with more volume than the rock but the same mass. This melt is less dense than the rock that surrounds it. The lighter magma moves upward because of its buoyancy, and if the density between the surface and zone of its generation is less than the overlying and surrounding rocks, it erupts.
A few magma compositions contain dissolved volatiles such as water and carbon dioxide. The amount of gases dissolved in the magma is zero at atmospheric pressure, but it increases with an increase in pressure. In andesitic magma, which is saturated with water, the solubility of water decreases as the magma moves upward, and the water separates from it in the form of bubbles. When the volume of bubbles in the magma reaches about 75 percent, disintegration of magma into partially solid and molten fragments happens, along with an explosive eruption. Injection of more magma inside an already filled magma chamber forces some of the magma to move toward the surface, causing an eruption..