Magma is molten silicate material generated by melting deep within the Earth. High temperatures are generated by radioactive decay and pressure is provided by the overlying pile of rock.
Crystallization forms bodies of crystalline intrusive igneous rock as the magma rises through the crust. Igneous extrusive rocks (volcanic rocks) are formed if the magma reaches the surface.
Weathering is the process of breakdown of rocks at the Earth's surface by the action of wind, rain and ice. Water, wind and ice are also the agents of transportation for rock particles both in suspension and solution.
Deposition is the process of particles falling from suspension or being precipitated from solution to form layers of sediments. As the sediments are buried they are compacted and cemented. This process of lithification creates sedimentary rocks.
Metamorphism is the deep subsurface process by which sedimentary (and igneous) rocks are changed by the action of temperature, pressure and fluids. New minerals grow and a metamorphic rock is the product of the change.
Melting of deeply buried rocks generates new magma and the cycle is complete. Hot material rising in the Earth generates uplift which in turn promotes erosion so the cycle, driven by radioactive heating, is self-sustaining for thousands of millions of years.