Sedimentary rocks are formed when different layers of debris ( usually sand ) are forced together under pressure.
Metamorphic rock forms from other types of rock that have been changed by a combination of high heat and pressure.
Igneous rock forms when Lava/Magma cools down