There are four types of plate boundary.
At this type of plate boundary the convection currents diverge and the two plates move apart. They tend to be found under the sea e.g. Mid Atlantic Ridge. As the two plates move apart magma rises up from the mantle. When the magma reaches the surfaces it cools and solidifies to form oceanic crust. This process repeats itself and over time a volcano is created. Earthquakes are also created when friction builds up as the plates move over the mantle.
At destructive plate margins the convection currents converge and two plates move together. When a oceanic plate and a continental plate move together the oceanic plate is subducted (forced down) as it is denser. As it is subducted into the mantle the oceanic crust melts to form new magma. It also take sea water down with it which, when combined with the magma, makes it less dense than the mantle. This means that it will rise up through the continental plate to form a volcano. Eventually the sea water will turn into steam and this makes the volcano very explosive. Earthquakes are also created at this plate boundary as friction builds up when the oceanic plate moves underneath the continental plate.
Two continental plates are pushed together by convection currents. Neither crusts is heavier or thicker than the other so the plates collide and create fold mountains. This plate boundary causes fold mountains to form, but can also can earthquakes as friction builds up between the two plates. No volcanoes are created at this plate boundary.
At conservative plate boundaries two plates are moving past each other (usually at different speeds). As the plates move past each other friction builds up which is then released as an earthquake. No volcanoes occur at this plate boundary.
Most volcanic activity occurs at plate boundaries but there are areas of intense volcanic activity which aren’t at any plate boundaries. These are called hotspots. A hotspot is an area of the Earth’s crust which is hotter than usual; they occur where a plume of hot magma from the mantle is rising towards the surface. Sometimes the magma breaks through and reaches the surface (an eruption) and a volcano forms. The magma plumes which cause hotspots remain stationary but the crust moves. This creates chains of volcanic islands such as Hawaii. Hotspots can form on either oceanic or continental crust, and be near or far from plate boundaries.