Sedimentary Rock, Compaction, Cementation, Fossils and layers
One thing about compaction is that layers of sediment settle at the bottom of lakes,oceans,rivers etc.When a lot of layers of sediment fall down to the bottom it starts to compact from other layers of sediment and can contain fossils from dead fish or other animals.The natural forces push the sediment and ceate layers.