There are some important exceptions, for example the Hawaiian Islands, which are entirely volcanic in origin, formed in the middle of the Pacific Ocean, more than 3,200km from the nearest plate boundary
There are fixed spots in the mantle where magma rises to the surface. As the crust moves over these fixed spots, volcanoes are created, eventually forming a chain of volcanoes.