Sandstone forms from cemented sand grains through compaction and cementation. Shale forms from compacted clay and mud sediments. Coal forms from compacted organic material. Limestone forms from cemented calcium carbonate sediments and shells. Sedimentary rocks like sandstone, shale, and limestone can contain fossils.