The age of a rock in years is called its absolute age.Geologists find absolute ages by measuring the amount of certain radioactive elements in the rock.
In fact, sedimentary rocks are, in a sense, trash from the Earth's surface deposited in basins.
Because the Earth's crust is continually changing, i.e due to uplift, subsidence, and deformation, erosion is acting in some places and deposition of sediment is occurring in other places.
Relative dating is used commonly when looking at the relative order of geological events.
What can complicate relative dating is when the strata is not the right way up!
Thus rocks that we now see inclined or folded have been disturbed since their original deposition.
Stratigraphic Superposition - Because of Earth's gravity, deposition of sediment will occur depositing older layers first followed by successively younger layers.
The age of the rock in years can be found by measuring the rate at which a parent element decays and then measuring the ratio of parent element to daughter element in the rock.
The ages in years of the different geological time periods are found by measuring the absolute ages of many rocks from all of the different periods.
The base layer must come first, then the second and then the third.