Rocks are naturally occurring solid aggregates of minerals or mineraloids. There are three main types of rocks: igneous, sedimentary, and metamorphic. Igneous rocks form from cooling magma either underground (plutonic) or on the surface (volcanic). Sedimentary rocks form from the compaction and cementation of fragments. Metamorphic rocks form from changes to existing igneous and sedimentary rocks through heat and pressure. The rock cycle describes the interrelationships between these three rock types through geological processes like weathering, erosion, deposition, and metamorphism.