Illustrates the relationship between cooling magma and mineral formation.. The process in which different minerals crystallize from magma at different temperatures, removing elements from magma. Course-grained igneous rock that is formed when molten rock cools slowly and solidifies beneath the Earth's crust.