There are three main types of rocks: igneous, sedimentary, and metamorphic. Igneous rocks form from the cooling and solidification of magma either below or above the ground. Sedimentary rocks form from the compression of sediments and organic materials. Metamorphic rocks form from the alteration of existing igneous and sedimentary rocks through heat, pressure, and chemical changes. Rocks continuously change between these forms through the rock cycle as they are weathered, buried deep underground, and altered by melting.