The Rock Cycle shows the interrelated sequence of events by which rocks are eventually formed, altered, destroyed, and reformed as a result of magmatism, erosion, sedimentation, and metamorphism.
Below:
Below you will find a model of the Rock Cycle. It gives an idea of how rocks become Igneous, Sedimentary, or Metamorphic.

Transition to Igneous rock
When rocks are pushed deep under Earth's surface, they may melt into magma. If the conditions neccesary to keep magma in its
liquid form no longer exist, it will cool and solidify to form an igneeous rock. A rock that cools inside the Earth is called intrussive,
and will cool very slowly producing a coarse-grained texture. As a result of volcanic activity, magma may cool very rapidly while being
exposed to the atmosphere and are then called extrussive rocks. Extrussive rocks are fine-grained and sometimes cool so rapidly that
no crystals can form and result in a natural glass, such as obsidian. Any of the three main types of rocks can melt into magma and
cool into an igneous rock.
Transition to Sedimentary rock
Rocks exposed to the atmosphere are variably unstable and subject to the process of weathering and erosion. Weathering and erosion
breaks the original rock down into smaller fragments and carries away dissolved material. This fragmented material accumulates and
is buried by additional material. While an individual grain of sand is still a member of the class of rock it was formed from from,
a rock made up of such grains fused together, it is sedimentary. Sedimentary rocks can be formed of the lithification of these
buried smaller fragments, the accumulation and lithification of material generated by living organisms, or lithification of chemically
precipitated material from a mineral bearing solution due to evaporation. Clastic rocks can be formed from fragments broken apart
from larger rocks of any type, due to the process such as erosion or from organic material, such as plant remains.
Transition to Metamorphic rock
Rocks exposed to high temperatures and/or pressures can be changed physically or chemically to form a different rock, called
metemorphic. Regional metemorphism refers to the effects on large masses of rocks over a wide area. These rocks commonly
exhibit distinct bands of differing mineralogy and colors, called foliation. Another main type of metemorphism is caused when
a body of rock comes into contact with an igneous intrusion that heats up this surround country rock. Contact metemorphism
results in a rock that is altered and re-crystalized by the extreme heat of the magma and/or by the addition of fluids by the
magma that add chemicals to the surrounding rock.