Volcanoes are caused by oceanic plate subduction, oceanic plate spreading or mantle plumes. Two of these, subduction and oceanic plate spreading, are extremely common phenomena at the edges of plates of the Earth's crust and cause long chains of volcanoes, such as the Pacific Ring of Fire or the Mid-Atlantic Ridge. Volcanic hotspots are caused by mantle plumes, such as the one that created Hawaii, and can occur anywhere.
Volcanoes are all formed when very hot rock under high pressure manages to push its way to the surface. Generally this rock actually comes from below the crust, in the mantle. Subduction disturbs the mantle rock, causing it to liquefy, after which the pressure around it forces it toward the surface.
Seafloor spreading, on the other hand, occurs at interconnected ridges winding throughout the center of the world's oceans. These are the boundaries of oceanic plates, where they are slowly moving away from each other at about 10 centimeters per year. In this case, the underlying mantle rock liquefies in the reduced pressure and simply seeps up through the opening.
No one is quite sure why mantle plumes occur, but they are large bubbles of magma that push their way up through either the oceanic or continental crust.