Volcanoes are only found in certain places on Earth. You can find volcanoes in a "subduction zone." A subduction zone is a place where an oceanic plate from the Earth is being forced underneath another plate, that is either a continental plate or a second oceanic plate. These subduction zones and volcanoes are dotted all over the Pacific Ocean.
What happens is that the subducting plate is forced down below at an angle. Either it starts to melt when it gets down far enough where it is hot, or it gives away some liquids and gasses, then works its way up and makes some of the overlying mantle melt. Either way, magma is generated by the process of subduction and this magma rises to the surface and erupts like a volcano.
Another site where you can find a volcano is where two of the Earth's plates are spreading apart. When this occurs, magma from inside the mantle travels upwards to erupt and fills in the emptiness left behind as the plates move apart. This can happen both on land and below water, for example at mid-ocean ridges. Oceanic crust are also made when this occurs.
The last place where volcanoes are located is on top of Hotspots. When plates move about on the ground, the Hotspots will stay stationary for a long while. They bring magma and heat to the land which forms a volcano. Because these do not rely on plate boundaries (just like subduction-zone volcanoes and spreading-zone volcanoes don't) Hotspot volcanoes can be anywhere, even out in the middle of a plate. For example; the Hawaiian volcanoes were all formed by a hotspot that has remained a certain location while the Pacific plate has moved before.