Sedimentary rocks are those that are formed by the weathering or breaking down of pre-existing rocks that then get laid down and lithified in layers such as sandstone. Igneous rocks are formed by tectonic processes and the cooling of volcanic magma such as granite. Metamorphic rocks are formed by changing a pre-existing rock's composition and texture by heat and pressure from within the Earth such as slate.