Igneous rock β formed when magma cools and hardens
Rock formed when magma underground, or lava erupted onto the surface, cools and solidifies; the cooling speed greatly affects the size of the resulting crystals. When magma cools slowly deep underground, it forms intrusive rock like granite with large crystals; when lava erupted onto the surface during a volcanic eruption cools rapidly, it forms volcanic rock like basalt with crystals too small to see. In other words, magma of the same composition can form entirely different rocks depending on where and how fast it cools.
Sedimentary rock β formed by accumulation and compaction
Rock formed when sediment such as sand, mud, or the remains of organisms accumulates and is compressed over a long period of time. As sediment carried by rivers or the sea piles up in layers, it becomes compacted under the weight above it, and mineral content filling the gaps cements the grains together into hard rock. Compacted sand becomes sandstone, compacted mud becomes shale, and accumulated calcium-rich remains like shells become limestone. Sedimentary rock is characterized by its clearly visible layering (stratification) and is also the type of rock in which fossils are most commonly found.
Magma and lava β two easily confused terms
The biggest difference between the two terms is that it is called magma while underground, and lava once it erupts onto the surface. The chemical composition is similar, but the location differs. The molten state of rock formed in the mantle or lower crust is called magma, and from the moment it is exposed at the surface through a volcanic eruption, it is called lava. The red liquid seen in volcanic eruption footage is lava, while what remains underground below it is magma.
The role of weathering and erosion in the cycle
Rock exposed at the surface becomes raw material for sediment through weathering, in which it is broken down into small pieces by water, wind, and temperature change, and erosion, in which those fragments are transported elsewhere. Whether igneous or metamorphic, rock exposed at the surface for a long time gradually crumbles under the effects of wind, rain, and temperature changes β this is weathering. The transport of these small broken particles by rivers or wind to another location is erosion, and when this sediment accumulates in a low-lying area, it becomes the raw material that forms sedimentary rock once again. Without weathering and erosion, sedimentary rock as a type of rock would be difficult to form at all.
The connection between plate tectonics and the rock cycle
At subduction zones, where tectonic plates collide or one plate sinks beneath another, rock melts again into magma, continuing the cycle. In the process of one tectonic plate being pushed beneath another, the intense heat and pressure can cause rock to melt again into magma. When this newly formed magma is erupted again through volcanic activity, new igneous rock is formed β for this reason, plate tectonics is considered one of the fundamental driving forces that keeps the rock cycle continuously turning. If you're curious about the movement of plates itself, see our guide to the basics of plate tectonics as well.
Why fossils are found especially often in sedimentary rock
After an organism dies, its form is more easily preserved if it is rapidly buried in relatively soft sediment β and this process itself overlaps with the process by which sedimentary rock forms. Igneous rock passes through a hot magma or lava state, making it difficult for traces of organisms to survive within it, and metamorphic rock's original tissue structures are easily destroyed by intense heat and pressure. Sediment, by contrast, accumulates gradually at relatively low temperatures, making it far more likely for hard parts like bones or shells to become trapped inside and remain as fossils. For more detail on the specific process by which fossils form, see our guide to how fossils are formed as well.
True to its name, the cycle has no fixed order
The rock cycle does not flow only in the order igneous β sedimentary β metamorphic β it is an open cycle in which rock can transition directly from any stage to any other stage. If metamorphic rock is exposed at the surface and weathers, it can immediately become raw material for sediment; if sedimentary rock is compressed deep underground, it can become metamorphic rock without ever melting. In other words, there is no fixed order among the three rock types, and which path a given rock takes depends on the temperature, pressure, and location conditions it is subjected to. A single full turn of this cycle typically takes a span of geological time β anywhere from millions to hundreds of millions of years β that is difficult to grasp on a human timescale.