This article discusses how rocks are formed. There are also articles on physical rock formations, rock layerings (strata), and the formal naming of geologic formations.
Terrestrialrocks are formed by three main mechanisms:
Sedimentary rocks are formed through the gradual accumulation of sediments: for example, sand on a beach or mud on a river bed. As the sediments are buried they get compacted as more and more material is deposited on top. Eventually the sediments will become so dense that they would essentially form a rock. This process is known as lithification.
Metamorphic rocks once existed as igneous or sedimentary rocks, but have been subjected to varying degrees of pressure and heat within the Earth's crust. The processes involved will change the composition and fabric of the rock and their original nature is often hard to distinguish. Metamorphic rocks are typically found in areas of mountain building.
Rock can also form in the absence of a substantial pressure gradient as material that condensed from a protoplanetary disk, without ever undergoing any transformations in the interior of a large object such as a planet or moon. Astrophysicists classify this as a fourth type of rock: primitive rock. This type is common in asteroids and meteorites.[1]: 145
^Cite error: The named reference lissauer2019 was invoked but never defined (see the help page).