Formation of rocks. 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.

Terrestrial rocks 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.
 Igneous rocks have crystallised from a melt or magma. The melt is made up of various components of pre-existing rocks which have been subjected to melting either at subduction zones or within the Earth's mantle. The melt is hot and so passes upward through cooler country rock. As it moves, it cools and various rock types will form through a process known as fractional crystallisation. Igneous rocks can be seen at mid-ocean ridges, areas of island arc volcanism or in intra-plate hotspots.
 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.

Rock formation

19th-century efforts to synthesize rocks  

The synthetic investigation of rocks proceeds by experimental work that attempts to reproduce different rock types and to elucidate their origins and structures. In many cases no experiment is necessary. Every stage in the origin of clays, sands and gravels can be seen in process around us, but where these have been converted into coherent shales, sandstone and conglomerates, and still more where they have experienced some degree of metamorphism, there are many obscure points about their history upon which experiment may yet throw light. Attempts have been made to reproduce igneous rocks, by fusion of mixtures of crushed minerals or of chemicals in specially contrived furnaces. The earliest researches of this sort are those of Faujas St Fond and of de Saussure, but Sir James Hall really laid the foundations of this branch of petrology. He showed (1798) that the whinstones (diabases) of Edinburgh were fusible and if rapidly cooled yielded black vitreous masses closely resembling natural pitchstones and obsidians. If cooled more slowly they consolidated as crystalline rocks not unlike the whinstones themselves and containing olivine, augite and feldspar (the essential minerals of these rocks).

Many years later Daubrée, Delesse and others carried on similar experiments, but the first notable advance was made in 1878, when Fouqué and Lévy began their researches. They succeeded in producing such rocks as porphyrite, leucite-tephrite, basalt and dolerite, and obtained also various structural modifications well known in igneous rocks, e.g. the porphyritic and the ophitic. Incidentally, they showed that while many basic rocks (basalts, etc.) could be perfectly imitated in the laboratory, the acid rocks could not, and advanced the explanation that for the crystallization of the latter the gases never absent in natural rock magmas were indispensable mineralizing agents. It has subsequently been proved that steam, or such volatile substances as certain borates, molybdates, chlorides, fluorides, assist in the formation of orthoclase, quartz and mica (the minerals of granite). Sir James Hall also made the first contribution to the experimental study of metamorphic rocks by converting chalk into marble by heating it in a closed gun-barrel, which prevented the escape of the carbonic acid at high temperatures. In 1901 Adams and Nicholson carried this a stage further by subjecting marble to great pressures in hydraulic presses and have shown how the foliated structures, frequent in natural marble may be produced artificially.

Extraterrestrial rock 
Off-Earth, rock can also form in the absence of a substantial pressure gradient as material that condensed from a protoplanetary disk, without ever undergoing transformations in the interior of a large object such as planets and moons.  Astrophysicists classify this as a fourth type of rock:  Primitive rock.  

Primitive rocks "have never been heated much, although some of their constituents may have been quite hot early in the history of our Solar System. Primitive rocks are common on the surfaces of many asteroids, and the majority of meteorites are primitive rocks."

An example of a primitive rock is the achondritic iron-nickel octahedrite mineral seen in the Widmanstätten pattern that is found in a number of iron-rich meteorites.  Consisting of kamacite and taenite and formed under extremely slow cooling conditions—about 100 to 10,000 °C/Myr, with total cooling times of 10 Myr or less—it will precipitate kamacite and grow kamacite plates along certain crystallographic planes in the taenite crystal lattice.

See also 

 
 List of individual rocks
 List of minerals
 List of rock types
 List of rocks on Mars
 Petrifaction
 Rock cycle

References

External links
 The rock forming process, on sci-culture.com

Petrology