If the newly formed metamorphic rock continues to heat, it can eventually melt and become molten. When the molten rock cools it forms an igneous rock. Metamorphic rocks can form from either sedimentary or igneous rocks. Extrusive, or volcanic, igneous rocks are formed when molten hot material cools and solidifies. There are three main types of rocks: sedimentary, igneous, and metamorphic. Each of these rocks are formed by physical changes such as melting, cooling, eroding, compacting, or deforming that are part of the rock cycle. Metamorphic rocks form when rocks are subjected to high heat, high pressure, hot mineral-rich fluids or, more commonly, some combination of these factors. Conditions like these are found deep within the Earth or where tectonic plates meet.