Rocks are divided into three main types, based on the ways in which they form. Igneous rocks are made of old rocks that have melted within the earth to form molten material called magma. Magma cools and solidifies to become igneous rocks. Sedimentary rocks form as layers of material settle onto each other, press together, and harden. Metamorphic rocks are created when existing rocks are exposed to high temperatures and pressures, and the rock material is changed, or metamorphosed, while solid.
Igneous rocks are rocks formed from a molten or partly molten material called magma. Magma forms deep underground when rock that was once solid melts. Overlying rock presses down on the magma, and the less dense magma rises through cracks in the rock. As magma moves upward, it cools and solidifies. Magma that solidifies underground usually cools slowly, allowing large crystals to form. Magma that reaches Earth’s surface is called lava. Lava loses heat to the atmosphere or ocean very quickly and therefore solidifies very rapidly, forming very small crystals or glass. When lava erupts at the surface again and again, it can form mountains called volcanoes.
Igneous rocks commonly contain the minerals feldspar, quartz, mica, pyroxene, amphibole, and olivine. Igneous rocks are named according to which minerals they contain. Rocks rich in feldspar and quartz are called felsic; rocks rich in pyroxene, amphibole, and olivine, which all contain magnesium and iron, are called mafic. Common and important igneous rocks are granite, rhyolite, gabbro, and basalt. Granite and rhyolite are felsic; gabbros and basalt are mafic. Granite has large crystals of quartz and feldspar. Rhyolite is the small-grained equivalent of granite. Gabbro has large crystals of pyroxene and olivine. Basalt is the most common volcanic rock.
Sedimentary rock forms when loose sediment, or rock fragments, hardens. Geologists place sedimentary rocks into...