The document describes the rock cycle, which involves the formation, alteration and transformation of rocks over geological time. Igneous rocks form from cooling magma underground or lava at the Earth's surface. Weathering and erosion break down igneous and sedimentary rocks into sediments. Compaction and cementation of sediments form sedimentary rocks. Subjecting any rock type to heat and pressure can create metamorphic rocks.