| Cooling slowly, underground | Underground, in a chamber of magma | About 2–14 km down | About 650–1,200 °C magma, depending on its make-up | About 520–3,700 times the air pressure at sea level | Thousands to millions of years, so big crystals have time to grow | Heat flows out of the magma into the cooler rock around it |
| Cooling quickly, as lava | At the surface, as a lava flow | At the surface | Lava at about 650–1,200 °C cools to air temperature | Air pressure at the surface | Hours to a few years: too fast for big crystals | Heat escapes from the lava into the air, water and ground |
| Uplift and exposure | Brought up to the surface, as mountains rise and erosion strips away the rock above | At the surface | Cools as it rises, ending at surface temperatures | Air pressure at the surface | About 8 million years to rise 8 km at 1 mm per year | Earth’s internal heat drives the plate motions that build mountains; erosion, driven by the Sun, uncovers the rock |
| Weathering and erosion | At the surface | At the surface | Surface temperatures, like the weather | Air pressure at the surface | Years to millions of years | Sunlight drives the weather and the water cycle; gravity pulls water, ice and grains downhill |
| Deposition | Rivers, beaches, lakes and the sea floor | At the surface | Surface temperatures, like the weather | Air pressure at the surface | Years to thousands of years for each layer | Gravity: grains settle when the water or wind carrying them slows down |
| Compaction and cementation | Buried under younger layers | About 1–5 km down | About 25–125 °C | About 260–1,300 times the air pressure at sea level | Thousands to millions of years | Gravity: the weight of the layers above squeezes the grains, and minerals in the water glue them |
| Heat and pressure, very low grade | Deep under a mountain range | About 8–12 km down | About 200–300 °C (very low grade) | About 2,100–3,100 times the air pressure at sea level | Millions of years | Earth’s internal heat, plus squeezing as plates push together |
| Heat and pressure, low grade | Deep under a mountain range | About 12–16 km down | About 300–400 °C (low grade) | About 3,100–4,200 times the air pressure at sea level | Millions of years | Earth’s internal heat, plus squeezing as plates push together |
| Heat and pressure, medium grade | Deep under a mountain range | About 16–24 km down | About 400–600 °C (medium grade) | About 4,200–6,300 times the air pressure at sea level | Millions of years | Earth’s internal heat, plus squeezing as plates push together |
| Heat and pressure, high grade | Deep under a mountain range | About 24–32 km down | About 600–800 °C (high grade) | About 6,300–8,400 times the air pressure at sea level | Millions of years | Earth’s internal heat, plus squeezing as plates push together |
| Melting silica-rich (felsic) rock | Deep in the crust | About 26–32 km down | About 650–800 °C for silica-rich (felsic) rock | About 6,800–8,400 times the air pressure at sea level | Thousands to millions of years | Earth’s internal heat |
| Melting medium silica (intermediate) rock | Near the bottom of the crust | About 32–40 km down | About 800–1,000 °C for medium silica (intermediate) rock | About 8,400–10,000 times the air pressure at sea level | Thousands to millions of years | Earth’s internal heat |
| Melting silica-poor (mafic) rock | In the upper mantle, below the crust | About 40–48 km down | About 1,000–1,200 °C for silica-poor (mafic) rock | About 10,000–13,000 times the air pressure at sea level | Thousands to millions of years | Earth’s internal heat |