Metamorphic rocks can form from both igneous and sedimentary rocks
heat and presure
by metamorfism of sandstone.
Igneous-sedimentary weathering/erosion Igneous-Metamorphic high pressure and heat
It gets under a lot of pressure underground and then changes. Metamorphic just means changing.