Heat, pressure, and weathering transform rock
Igneous rock forms from molten magma cooling. When exposed at the surface, it weathers into sediment. That sediment is transported by water and wind, then deposited and compacted into sedimentary rock. If that sedimentary rock is buried deep and heated under pressure, it transforms (metamorphoses) into metamorphic rock. If pushed deeper yet, it melts back into magma, and the cycle restarts.
No rock is permanent. All three types cycle through each other over millions of years. The carbon in limestone becomes the carbon in marble becomes the carbon in magma becomes new rock.
Timescale and visibility
The rock cycle is invisible at human timescales. A single complete cycle takes tens of millions of years. But where active volcanism, collision tectonics, or rapid erosion occur, you can see multiple steps in a few thousand kilometers: fresh igneous rock at a volcano, weathered sediment in a river, metamorphic rock in a mountain belt.