Volcanoes form when magma, which is molten rock from beneath the Earth's crust, reaches the surface. The magma erupts to form lava.
Volcanoes usually form along plate boundaries, where tectonic plates are either moving towards or away from one another:
Constructive boundary (or divergent boundary) - this is where two plates move away from one another. Magma rises up to fill the gaps between the plates usually to create a shield volcano.
Destructive boundary (or convergent boundary) - this is where two plates move towards one another. The oceanic crust sinks beneath the continental crust at a subduction zone - a point where the more dense, oceanic plate is forced beneath the less dense, continental plate. As the oceanic crust sinks into the mantle, it melts and creates magma and increases pressure. This magma rises to form explosive composite volcanoes (also known as stratovolcanoes).
Volcanoes affect different places in different ways. They cause more damage in poorer countries, where there are fewer resources to predict and prepare for them.