Knowing the fossil record lets a geoscientist place a particular fossiliferous rock layer into the scale of geologic time. But the time scale given by fossils is only a relative scale, because it does not give the age of the rock in years, only its age relative to other layers. Long after the relative time scale was worked out from fossils, geologists developed methods for finding the absolute ages of rocks, in years before the present. These methods involve radioactivity. Here's how one of the important ones works.
Some minerals contain atoms of the radioactive chemical element uranium. Now and then, an atom of uranium self-destructs to form an atom of lead. Scientists know the rate of self-destruction. They grind up a rock to collect tiny grains of minerals that started out containing some uranium but no lead. Then they use a very sensitive instrument, called a mass spectrometer, to measure how much of the uranium has been changed to lead. Using some simple mathematics, they can figure out how long ago the mineral first formed. It is possible to date rocks as old as four billion years this way.
Absolute dating of rocks has provided many "tie points" for the relative time scale developed from fossils. The result is an absolute time scale. When you collect a fossil from a rock, you can place it in the relative time scale. Then you also know about how old it is in years (or usually millions, or tens of millions, or hundreds of millions of years). Even though modern technology makes it possible to date some rocks, the relative time scale is still very important. This is because it takes a lot of time and money to obtain an absolute date, and not all rocks can be dated using radioactivity.