How is a sedimentary rock formed?