There are three main types of rocks: igneous, sedimentary, and metamorphic. Igneous rocks form from the cooling of molten rock either underground (intrusive) or above ground (extrusive). Sedimentary rocks form from the compaction and cementation of sediments and include rocks like limestone and sandstone. Metamorphic rocks form from existing rocks undergoing changes due to heat and pressure in the Earth's crust. Rocks cycle between these forms through geological processes over long periods of time.