Sedimentary rocks are formed from layers of sediment (sand, mud etc.) that are laid down on the Earth’s surface. The sediments can be coarse, medium or fine grained, and form from the weathering and erosion of existing rocks or of organic remains such as plants or shells.
As sediments build up the layers beneath are compacted. Dissolved minerals flow between the sediment particles and cement them together to become rock in a process called lithification.