Mud is a mixture of clay and silt, which are both very fine-grained sediments. As these sediments accumulate in layers, they are buried under increasing pressure. This pressure squeezes out the water and compacts the particles together, forming a dense, layered rock called shale.