QUICK ANSWER
A volcano erupts when the pressure of a subterranean pool of magma becomes great enough to crack the earth's crust. Whether the eruption results in a violent explosion or a slow seepage depends on several different factors, according to How Stuff Works. KNOW MORE
FULL ANSWER
Molten rock, called magma, forms underground when Earth's tectonic plates collide or move apart, or when activity within the mantle, a very hot layer beneath the earth's crust, causes the crust to melt. Magma contains dissolved gases that remain dissolved as long as the pressure of the gas is not greater than the confining pressure of the solid rock around it. If the vapor pressure becomes great enough, the gas forms small bubbles within the magma. These bubbles are less dense than the surrounding magma, so they push upward to escape it, and an eruption occurs. The composition of the magma is an important factor in determining the force of this eruption. If it contains larger amounts of gas, it erupts more violently. Another factor is the viscosity of the magma. Magma with a high viscosity resists flowing, and the gas bubbles must forcefully push out more material to escape. On the other hand, magma with a low gas content and low viscosity is likely to result in a slow, non-explosive eruption