When subducting under the continental plate, the oceanic plate reaches a depth of approximately 100 kilometers, which causes the water bound in the minerals to become unstable. Then the rocks enter the mantle, and the increase of pressure and heat, causes them to melt, forming basaltic magma. Another way the magma forms is when pressure decreases. First, as rock rises from the mantle, the decrease in pressure makes it expand, taking up more space. When the rock reaches shallow depths, pressure decreases and rock melts forming magma.