Volcanoes often form over hotspots. Hotspots are regions in earth's mantle, from which the heat (generated from deep within the earth) continually pours out, as a plume. This thermal flow is sufficient enough to melt the rocks in our tectonic plates, which form earth's uppermost layer known as the crust. The molten rocks, known as the magma, rises and erupts through cracks in the crust, giving rise to volcanoes. Interestingly, a number of currently active volcanoes are formed over geologic hotspots. The most common example of this is the Hawaiian volcanic range. Due to a geologic hotspot in the region, areas directly above it become volcanoes and continually erupt. When the tectonic plates moves away, such volcanoes no longer have any eruptions and new volcanoes are formed in the region directly above the hotspot. This has given rise to a chain of volcanic mountains in the Pacific ocean.
Hope this helps.