The metamorphic rocks are the result of other types of rocks being exposed to high temperatures and pressures. The igneous rocks and the sediment rocks (though less) are the parent material for the formation of the metamorphic rocks. Through geologic process, the rocks can get deeper into the ground, reaching places where the temperatures and pressures are much higher. Once they are exposed to higher temperatures and pressures for a prolonged period of time, the rocks start to change their structure. Apart from changing themselves, if there's rocks from other types close to them, it is very common that they mix under those circumstances, and eventually give birth to a new type of rock.