Answer:
Melted rock or magma is sent to the earth's surface by a volcano. It cools and forms igneous rock.
Next the weather, or a river, and other events will slowly break up this rock into small pieces of sediment.
As sediment builds up and hardens over years, sedimentary rock is formed.