Sedimentary rocks are formed when pieces of different rocks become joined together to form sediment. A few examples of this type of rock are chalk, sandstone, and limestone.
When sediment is picked up by rivers and wind, it is usually deposited at the bottoms of rivers and lakes, where the sediment builds up. The weight of the sediment on top squishes the sediment below, thus making the rocks to stick together, this process is called cementation.
Some sedimentary rocks, like sandstone, have layers of rock. The layer at the bottom is the oldest layer. In that layer you may find fossils of animals trapped in the cementation process. The higher layers of sediment are the younger layers, which have almost no fossils in them.