Sedimentary rocks form from the compaction and cementation of sediments. There are three main types: detrital (clastic) rocks that form from lithified rock fragments and minerals, chemical rocks that precipitate directly from solution, and organic rocks that accumulate from biological debris. Sedimentary rocks provide clues about past environments and climates based on their composition, structures like cross-bedding and ripples, and any fossil content. Important resources like coal and oil are also found within sedimentary basins.