Archaeologists rely heavily on stratigraphy (the natural and cultural deposition of sediment, debris, and other materials in discrete layers, or strata) to reconstruct the histories of sites—before, during, and after they were occupied by people:
The above illustration is a greatly simplified schematic. The photograph below shows a real stratigraphic profile of a portion of a buried structure as exposed in a test pit. Clearly it takes training and experience to "read" stratigraphy.
Stratigraphy basics (Wikipedia).