How does sedimentary rock become metamorphic and then igneous?
A quick example: Near shore sedimentary is subducted due to the collision of tectonic plates. The sedimentary rock gradually becomes slate from low grade metamorphism due to heat and pressure. The slate then becomes a higher grade metamorphic rock, like schist. If the increase in heat and pressure continue with subduction, the rock will eventually melt. If the product of this melt is erupted by a volcano or becomes a plutonic extrusion and solidifies, it will form an igneous rock.