What you are seeing below are sediments. These are small particles of rocks, bones and other fragments of materials. These are made through the process of weathering, erosion and deposition.
This is a sedimentary rock. It is formed when the sediments get compacted and cemented together.
This is an example of a metamorphic rock. It is formed when heat and pressure are added to the rock. It can form from sedimentary or igneous rock with heat and pressure.
Magma, which is pictured above is when metamorphic or sedimentary rock is melted. This occurs with volcanoes.
When the volcano erupts it spits out magma and lava which then begins to cool and harden. When this occurs we then get an igneous rock.
This is an example of an igneous rock. Cooled and hardened magma and lava.