If you add all of them you get a rock cycle which means how they can all become the same rock over a over again like to a sedimentary to a metamorphic to an igneous. I will tell you how it work first wind, ice, and water erode a cliff and the sediments go to a deposition where weight gets on top of the sediments and compact the sediments and over along time they form sedimentary rock. After sedimentary rocks are formed they get buried in the earth and compacted with heat and pressure to form metamorphic rocks. After metamorphic rocks are formed they get melted down into magma and when the magma sees a opening in earth's surface it shoots up out of the volcano to make lava.When the lava cools it becomes igneous rock. After all this happens it starts again the wind,water, and ice erode the sediments and carry to a deposition where the process happens again and again it could go on forever and ever.