As the layers build up, they compress and harden into sedimentary rocks.
(the layers; build up; ) (they; compress; ) (they; harden; into sedimentary rocks)
the layers they they
build up compress harden
into sedimentary rocks