This document describes the three main types of rocks: sedimentary, igneous, and metamorphic. Sedimentary rocks form from the compaction and cementation of sediments and sometimes contain fossils. Igneous rocks form from cooled magma, either extruding from volcanoes as lava or slowly cooling underground. Metamorphic rocks are formed by heat and pressure acting on existing rocks, changing their composition and structure.