When sediments are deposited, they form layers, one on top of the other. Over time, these layers can be compacted and cemented together to form a sedimentary rock. The layering of sedimentary rocks is a result of the way they are formed, and it is one of their most characteristic properties.