Archaeology could be defined as the study of people in the past through their material remains. When we investigate an archaeological site, for example through excavation, we are usually looking at what people in the past left behind.
Archaeology works on a simple principle called stratigraphy. This basically looks at the ground as being made up of layers. The layers are laid down over time, so generally the lowest layers are also the earliest.
When sites are excavated we record where the layers - known as contexts - were, what they looked like and what was found inside them. In this way we can give approximate dates to the layers themselves - whether because of the objects found within them, or because we know the dates of other layers around them.
It is important to remember that what is left in the ground, the "archaeological record" of what happened in the past, can be as flawed and biased as historical documents. Not everyone may have left things behind, not everything left behind will survive, and excavation is an expensive and destructive process so we have only an incomplete picture of what lies beneath our feet.