The rock cycle is a cycle that shows the transitions between forms of rocks. Ignious to Sedimentary to Metamorphic. Any type of rock can change to any of the other types under the right conditions.
The picture below demonstrates the rock cycle.
The picture below demonstrates the rock cycle.
If a sedimentary or Metamorphic rock melt and become magma. When they then cool they have just become a ignious rock. It requires enormous heat to melt a rock so this would usually occur in magma chambers where the heat is enough to melt rock.
If an ignious or metamorphic and even sedimentary rocks get eroded away over time and their sediments build up in a river bed and compact, a sedimentary rock has just been formed.
If any sedimentary or Ignious rock were to be exposed to enough heat and pressure to change them physically then a metamorphic rock will be created. This usually can only happen deep in the earth where the heat and pressure are greater then closer to the surface.