Sedimentary rocks are formed by sediment that is deposited over time, usually as layers at the bottom of lakes and oceans. This sediment can include minerals, small pieces of plants and other organic matter. The sediment is compressed over a long period of time before consolidating into solid layers of rock.