Volcanoes are formed when magma from within the Earth's mantle rises to the surface. This can happen through tectonic plate movements, hotspots, or subduction zones. When the pressure from the magma builds up and is released through a vent in the Earth's crust, it results in a volcanic eruption, which can create a volcano.