There are three main types of rocks: 1) Igneous rocks form from solidified magma either below or above the surface. 2) Sedimentary rocks form from compressed and cemented sediment. 3) Metamorphic rocks form from existing igneous or sedimentary rocks that have been altered by heat and pressure.