Rock that has formed through the deposition and solidification of sediment, especially sediment transported by water (rivers, lakes, and oceans), ice ( glaciers ), and wind. Sedimentary rocks are often deposited in layers, and frequently contain fossils .