Stratigraphy refers to geological and archaeological layers that make up an archaeological deposit. Archaeologists use stratigraphy to better understand the processes that created the site. Charles Lyell's Law of Superposition argued that because of natural depositional processes (and in an undeformed natural sequence), soils found deeply buried will have been laid down earlier—and thence be older—than the soils found on top of them.
The amateur geologist William "Strata" Smith was one of the earliest practitioners of stratigraphy in geology; he noticed that layers of fossil-bearing stone seen in road cuts and quarries were stacked in the same way in different parts of England.
Scientific archaeologists picked up on this relatively quickly, although it wasn't used as a consistent technique until around the turn of the 19th century. Since then, the technique has been refined, and tools such as the Harris Matrix assist in picking out the sometimes quite complicated and delicate deposits.
Lyman, R. L. and Michael J. O'Brien 1999 Americanist Stratigraphic Excavation and the Measurement of Culture Change. Journal of Archaeological Method and Theory 6(1):55-108.