sedimentary - types of rock that are formed by the deposition of material at the Earth's surface and within bodies of water. Sedimentation is the collective name for processes that cause mineral and/or organic particles (detritus) to settle and accumulate or minerals to precipitate from a solution.
metamorphic - It is arise from the transformation of existing rock types, in a process called metamorphism, which means "change in form". The original rock (protolith) is subjected to heat (temperatures greater than 150 to 200 °C) and pressure (1500 bars), causing profound physical and/or chemical change.
igneous - Igneous rock is formed through the cooling and solidification of magma or lava.
stratification - the arrangement of sedimentary rocks in distinct layers (strata), each layer representing the sediment deposited over a specific period.
stratification in rocks
Rock layers tend to be older since more sediment has turned into rock over time. That is why the older rock layers are on the bottom of younger rock layers.
In the middle of a long boring stretch of dark grey rock came an interval of green, white and red-brown limestone and marl, which corresponded to a formation expected several hundred meters deeper in the well. We concluded that the slightly older rock had been eroded off the top of the structure and deposited further down the flank where we happened to be drilling.
A biostratigraphic analysis would have shown a predominance of the older fossils, but with a few individual fossils from the time when the erosion/deposition took place to show what the true age was.
Living organisms have shaped landforms by coral reefs too.