There are three main types of rocks. Sedimentary rocks form from layers of sediment deposited on the seafloor. Igneous rocks form from lava or magma that cools and hardens into rock. Metamorphic rocks form from other rocks that are subjected to tremendous heat and pressure which changes the physical properties of the rock. Marble is an example of metamorphic rock. It is derived from limestone.