Rocks are constantly being transformed through a process called the rock cycle, which involves three main types of rock. Igneous rocks form when molten rock, called magma or lava, cools and hardens, either underground or after erupting from a volcano.
Over time, wind and water break rocks down into smaller sediments, which pile up in layers and become compacted and cemented together into sedimentary rocks. If existing rocks are subjected to intense heat and pressure deep underground, without melting completely, they transform into metamorphic rocks with new textures and mineral structures.
The rock cycle never truly stops: metamorphic rock can melt into magma and eventually cool into new igneous rock, or erode into sediment that forms new sedimentary rock, making the cycle a continuous, ongoing process that has shaped Earth's surface for billions of years.