Volcanic vents allow the Earth to release built up gases from the heat and pressure emanating from its core. Magma rises towards the surface, and as the pressure builds the magma seeks outlets through which to flow. The higher the pressure build-up, the greater the volcanic explosion.
Volcanoes in areas with more porous soil allow for the steady release of magma and are less likely to have severe explosions. Magma comes from rocks melted by the heat of the Earth's core. Because it is less dense than the un-melted rock, it slowly pushes up towards the surface. The continual creation of magma requires volcanoes for release both on Earth and other planets.