Carbon in nature is found in different isotopes, meaning that the number of neutrons in the nucleus can differ. The most common carbon isotope found in nature is called C-12, meaning that the nucleus contains 6 protons and 6 neutrons. But <1% of all naturally occuring carbon is the C-14 isotope, meaning that the nucleus has 6 protons and 8 neutrons. The C-13 isotope is naturally mildly radioactive and beta decays at a constant rate (called the half life). Once an organism dies it no longer accumulates any additional C-14 in its body and the radioactive decay begins to occur at a steady rate. So the amount of C-14 can be measured and then based on the decay rate you can count back in time to when the organism died. Keep in mind that there is a margin of error here so radiocarbon dating will give you date range and not really an exact year.