Sedimentary rocks are composed of sediments that are deposited and compacted over time. Sediments are formed from the weathering and erosion of pre-existing rocks, so sedimentary rocks cannot have been the first rocks on Earth. The first rocks on Earth were likely igneous rocks, which were formed from the cooling and solidification of magma.