1- Divergent plate boundaries
At the mid-oceanic ridges, two tectonic plates diverge from one another. New oceanic crust is being formed by hot molten rock slowly cooling down and solidifying.
2- Convergent plate boundaries
In places where one tectonic plate submerges beneath another, the crust melts and becomes magma. This surplus amount of magma generated in one location causes the formation of the volcano.
3- Hotspots
Hotspots are not located on the ridges of tectonic plates, but on top of mantle plumes, where due to the convection of Earth's mantle a column of hot material rises until it reaches the crust. Because the tectonic plates move whereas the mantle plume remains in the same place, each volcano becomes extinct after a while and a new volcano is then being formed as the plate shifts over the hotspot.
4- Petitspots
volcanoes were discovered that did not fit in any of the above-mentioned categories, since they are located far from the plate boundary, but are too small to be the result of a mantle plume. A new theory suggests that submergence of tectonic plates causes stress all over the plate, which causes the plate to crack in some places. However, other scientists believe the mantle plume theory to be incorrect, and consider this discovery a confirmation of their ideas.