Process of relative dating
Unlike people, you can’t really guess the age of a rock from looking at it.
This method works because some unstable (radioactive) isotopes of some elements decay at a known rate into daughter products. Half-life simply means the amount of time it takes for half of a remaining particular isotope to decay to a daughter product. Good discussion from the US Geological Survey: geochronolgists just measure the ratio of the remaining parent atom to the amount of daughter and voila, they know how long the molecule has been hanging out decaying. So to date those, geologists look for layers like volcanic ash that might be sandwiched between the sedimentary layers, and that tend to have radioactive elements.
In a way this field, called geochronology, is some of the purest detective work earth scientists do.
There are two basic approaches: relative age dating, and absolute age dating.
Geologists generally know the age of a rock by determining the age of the group of rocks, or formation, that it is found in.
The age of formations is marked on a geologic calendar known as the geologic time scale.