The circle at the very top is magma, when it cools and hardens it becomes igneous rock. Weathering and erosion leads to the circle which is sediment, which through compaction becomes sedimentary rock. And when heat and pressure is applied, it becomes metamorphic rock, which can melt to be magma