Shadow mapping
Shadows are produced by first rendering the scene's depth as seen from the light, then, during the normal pass, comparing each pixel's distance to the light against that stored map.
If a pixel sits farther away than the nearest depth the map remembers, something is blocking the light — so it is in shadow. Lance Williams described the trick in 1978 in "Casting curved shadows on curved surfaces", and it won out over the rival shadow volumes (stencil-based, Frank Crow 1977) because it is cheap and indifferent to how complex the geometry is.
The cost is artifacts. Low resolution gives stair-stepped edges; the wrong bias produces "shadow acne" (self-shadowing speckles) or "peter-panning" (the shadow detaches from the feet). PCF filters the edge soft, and cascaded shadow maps split the view into zones so ground near the camera gets high resolution. Point lights that cast in every direction solve it with a cubemap.