The simpliest way of knowing is when the layers are horizontal, the stratigraphy principle of superposition applies so the top layer is the youngest the bottom layer is the oldest.
This phenomena is a result of the conservation of angular momentum: An isolated system's rotational intertia does not change.
Angular momentum is given mathematically by