It is radioactive and decays over time at a known, fixed rate: after roughly 5,730 years — the half-life of carbon-14 — half of whatever amount was originally present will have decayed.

After another 5,730 years, half of the remainder will have decayed, and so on.

Measuring how much carbon-14 remains in a sample, compared to the non-radioactive carbon-12 that does not decay, tells you how long ago that carbon was last exchanged with the environment.

Living organisms — plants, animals, humans — exchange carbon continuously with their environment through breathing, eating, and metabolic processes.

As long as an organism is alive, it maintains a ratio of carbon-14 to carbon-12 that reflects the atmospheric ratio at that time.