Volcanoes erupt due to rising magma from the Earth's mantle. The viscosity and gas content of the magma determines the intensity and type of eruption. Highly viscous magma with more dissolved gases causes explosive eruptions that eject ash and rock into the atmosphere, while more runny magma results in effusive eruptions where lava flows out. Volcanic eruptions can have both negative effects like destroying landscapes and releasing ash that impacts the climate, as well as positive effects through generating nutrient-rich soils and opportunities for geothermal energy extraction.