Rocks are naturally occurring mixtures of minerals, mineraloids, or organic matter that are divided into three main types - igneous, sedimentary, and metamorphic - based on their formation process. Rocks are continually changed over time through the rock cycle as they are weathered, eroded, melted, cooled, cemented, and subjected to heat and pressure, allowing them to transition between the three rock types. The composition and origins of rocks, such as whether they formed from magma, sediments, or changed forms due to heat and pressure, are used to classify the different types of rocks.