Metamorphic rocks form deep underground through heat and pressure that alter existing rock. There are two types of metamorphism - regional, which affects large areas of crust over time, and contact, where intruding magma quickly alters surrounding rock. Heat within the Earth comes from radioactive decay in the core. Metamorphism can also be caused by hydrothermal fluids that change rock chemistry and mineralogy, sometimes forming valuable ore deposits. Metamorphic rocks exhibit different textures based on their mineral grain size and alignment.