Sedimentary rocks can change into metamorphic rock or into igneous rock. Metamorphic rock can also change into the other kinds of rock. Igneous rock forms when magma cools and makes crystals. Magma is a hot liquid made of melted minerals. The minerals can form crystals when they cool.
Igneous rock can form underground, where the magma cools slowly.
Or igneous rock can form above ground, where the magma cools quickly. When it pours out on earth's surface, magma is called lava. Yes, the same liquid rock matter that you see coming out of volcanoes. On earth's surface wind and water can break rock into pieces. They can also carry the rock pieces to another place.