Compare relative and absolute dating
However, note that because of the "principle of cross-cutting relationships", careful examination of the contact between the cave infill and the surrounding rock will reveal the true relative age relationships, as will the "principle of inclusion" if fragments of the surrounding rock are found within the infill.
Cave deposits also often have distinctive structures of their own (e.g., spelothems like stalactites and stalagmites), so it is not likely that someone could mistake them for a successional sequence of rock units. Each of them is a testable hypothesis about the relationships between rock units and their characteristics.
This document is partly based on a prior posting composed in reply to Ted Holden.
My thanks to both him and other critics for motivating me.
There are situations where it potentially fails -- for example, in cave deposits.
The principle of superposition therefore has a clear implication for the age of a vertical succession of strata.
The simplest situation for a geologist is a "layer cake" succession of sedimentary or extrusive igneous rock units arranged in nearly horizontal layers.
In such a situation, the "principle of superposition" is easily applied, and the strata towards the bottom are older, those towards the top are younger.
Many other indicators are commonly present, including ones that can even tell you the angle of the depositional surface at the time ("geopetal structures"), "assuming" that gravity was "down" at the time, which isn't much of an assumption :-).
In more complicated situations, like in a mountain belt, there are often faults, folds, and other structural complications that have deformed and "chopped up" the original stratigraphy.