Metamorphic rocks form from the changes in mineral composition and texture of existing rocks subjected to high temperatures and pressures within the Earth. There are two main types of metamorphism: contact metamorphism, caused by heat from nearby magma, and regional metamorphism, associated with large-scale mountain building. Metamorphic rocks exhibit either a layered, foliated texture or a nonfoliated texture without visible bands.