Radiocarbon dating is based on measuring the ratio of the stable carbon-12 to the radioactive beta-decaying carbon-14, which has a halflife of 5730 years. The method only works for once-living organisms, for only they respirate or otherwise eat carbon containing plants that respirate. The carbon-14 is continuously created in the Earths atmosphere by cosmic ray bombardment of nitrogen-14 and is also continually and radioactively decaying, and thus exists in equilibrium. The carbon dioxide of the Earths' atmosphere is thus composed of a certain fixed ratio of carbon-12 to carbon-14. Because living organisms (including plants) respirate CO2, they reflect this ratio. After death, however, the continually disintegrating carbon-14 is no longer replenished, and as the carbon-14 decays, so the ratio of carbon-14/carbon-12 gradually decreases exponentially with time. Measuring this ratio determines how long the organism has been dead. This used to be done by detecting the emitted electrons from radioactive disintegrations of carbon-14 atoms, but this method is in-sensitive after about 5 halflives (30,000 years) requiring large samples.
A much more sensitive technique is, instead of waiting for some of the few remaining atoms of carbon-14 to decay (and with a halflife of 5730 years, not many of them do so during the measurement period), to count all the carbon-14 and carbon-12 atoms by vaporising the sample in a mass spectrometer. Only very small samples are then required. This was done for a small corner of the Turin shroud, proving it to be only about 650 years old (and certainly nowhere near the 2000 years it would be if it was used in Biblical times) and thus a 'fake'. Though how it was faked, no one knows.
The accuracy of radiocarbon dating is limited by the fact that the cosmic rays producing the carbon-14 are not constant. A further limitation is that the burning of fossil fuels over the last 150 years which contain no carbon-14 (having long since decayed) dilutes the C-13/C-14 ratio. [The carbon dioxide in air has increased from 295 ppm (pre-industrialisation) to over 403 ppm (present day levels as of 2015) and is still rising]. Because carbon-14 is produced by cosmic ray bombardment of elements on Earth, it is a Cosmogenic Nuclide.