Over the years the sediments compacted and a sedimentary rock formed. But one day the rock was swept into a river and floated out to the ocean.
The rock sank to the bottom of the ocean. Over the years the rock got closer to the Earth's core. Because of the immense heat and pressure the rock became a metamorphic rock,
The rock then melted and became magma. When the volcano erupted the lava was propelled out and onto a beach below the mountain.
After the lava hardened it became a igneous rock.
Then once again the rock was weathered down into sand.