Most volcanoes occur:
at divergent plate boundaries (ocean ridges or rifts) and at convergent plate boundaries at subduction zones.
These are the two primary tectonic settings where volcanic activity is most prevalent. At divergent boundaries, magma rises to create new crust, while at subduction zones, one tectonic plate is forced under another, leading to melting and volcanic activity.