Sedimentary rocks are formed from particles of sand, shells, pebbles, and other fragments of material. Together, all these particles are called sediment. Gradually, the sediment accumulates in layers and over a long period of time hardens into rock.