Sedimentary rocks form through the compaction and cementation of sediments. There are three main types: clastic rocks form from fragmented sediments like sand and gravel; chemical rocks form when dissolved minerals precipitate out of solution, like limestone and rock salt; and organic rocks form from the remains of once-living organisms, such as coal, petrified wood, and fossil-bearing limestone.