Volcanism typically occurs at the edge of tectonic plates. If the plates are oceanic and move away from each other, low–density basalt lava floats up in the gap and forms undersea mountain ranges. If the two oceanic plates move towards each other, volcanic archipelagos containing a tad of sediments are created.
During the collision of an oceanic and a continental plate, the former submerges beneath the latter in a process called subduction. The plate melts in the depth and moves up through the continental layers, which results in denser lava of minerals like andesite and tall, layered volcanoes.