Sedimentary rocks form when particles are deposited, compacted, and eventually cemented together over time to form a rock.
Sediments are formed by the deposition of layers of particles (which can range in size from salt molecules to avalanching rocks bigger than a house). They are usually transported and then laid down in either slowing water (eg. in rivers, lakes or oceans) or wind (eg. sand dunes in the desert). However, sediments can also accumulate in quiet environments, like debris of plants in swamps, crystals in salt lakes or corals in reefs.
Over geological time, layers of sediment are progressively buried. The particles then become compacted and even stuck together by natural cements. That process, called ‘lithification’, actually turns the mass of sedimentary particles into sedimentary rocks.
Some common examples of sedimentary rocks, are claystones, sandstones, limestones and conglomerates. Sedimentary rocks are distinguished from igneous rocks formed by cooling of magma and metamorphic rocks formed by transformation of rocks under increased pressure and temperature.