The subduction of oceanic crust under continental crust. Volcanoes typically form in the crust above.
If crust is being created at rifts, then it also must be destroyed somewhere else in order to keep the area of the Earth constant. This happens at "subduction" zones where oceanic crust slides back into the mantle layer which lies under the overlaying plate.
Subduction zones lie all around the Pacific Ocean and explain many of its most distinctive features: the chain of volcanoes around the edge of the Pacific known as the "Ring of Fire", the frequency of earthquakes and the deep ocean trenches in the northwest Pacific.
The earthquakes occur because the motion of the subducted crust is rarely smooth: instead it proceeds in jerks, as pressure builds up and is then suddenly released. The consequences on the surface can be catastrophic, both from the shaking of the ground and from tsunamis triggered by sudden changes in the ocean floor.
Volcanoes at subduction zones are a consequence of the water contained in the subducted ocean crust. This water is released into the mantle rock under the crust and lowers its melting point. The rock melts and then can erupt explosively onto the surface.
Continental crust rarely gets subducted because it is less dense than ocean crust and floats higher in the mantle. Thus when two continents collide neither is subducted and instead the rocks are pushed upwards, forming mountain ranges.
Continental crust and its outlying underwater shelf is mostly granite and other metamorphic rocks rich in silicon, aluminium and oxygen. At the surface it may be covered in sedimentary rocks such as limestone and sandstone. It varies between 25km and 70km thick.
On the other hand oceanic crust is much thinner at 7-10km thick and is mostly basalt, rich in magnesium, iron, silicon and oxygen.
Because it is eventually subducted, oceanic crust is nowhere older that about 200 million years, wheras continental crust can be several billion years old.
Continental crust is virtually never subducted, because its density is too low to sink back into the mantle. It is buoyant.
Subduction zone volcanoes are very different from the volcanoes which appear at rifts (e.g. Iceland). The latter spew basalt.
Mount St. Helens and Mount Fuji are good examples of volcanoes above subduction zones.
The volcanic rock from subduction zones cools into granites which form the bedrock of the continents. This is how continental crust forms.
Wikipedia: Subduction: Volcano arcs are also known to be associated with precious metals such as gold, silver and copper - again believed to be carried by water and concentrated in and around their host volcanoes as ore.