Lithification is the process by which sediments are compacted and cemented together to form solid rock, such as sandstone, shale, or limestone. This process typically involves the removal of water from the sediment and the precipitation of minerals that act as a glue holding the particles together.