The raw material of coal is mainly of plant origin. Typical charcoal formation (humus charcoal, see General classification: Types of charcoal) starts in extensive swamp forests of lowlands. The trees bind carbon dioxide from the air by means of photosynthesis and convert it into the carbohydrate cellulose and other organic compounds. After individual trees die, they sink into the swamp and are thus removed from the normal aerobic decomposition process - peat is initially formed.
The decisive factor in whether the peat becomes coal is the further geological history of the region concerned. The earth's crust usually undergoes tectonic subsidence in the area of lowlands (subsidence, see also sedimentary basins). If this subsidence continues over geological periods (i.e. many tens of millions of years), the peaty marsh sediments, under then often different environmental conditions (including long-lasting marine cover), are continuously overlain by sediments and at the same time submerged into the deeper upper crust. In the process, both the ambient pressure and the ambient temperature increase with increasing depth of submersion. This causes the so-called incarbonation of the peaty sediments. The pressure squeezes out the water, and the increase in temperature causes the chemical transformation of the organic compounds, in the course of which an accumulation of carbon takes place. This initially produces lignite. With increasing sinking, the coalification intensifies. Lignite becomes hard coal and finally anthracite. This is why the quality of coal is often better the deeper it lies in the earth and the older it is.
The most important hard coal deposits today (often only in terms of economic history) were formed in the Upper Carboniferous about 323.2 to 298.9 million years ago. In the early Upper Carboniferous, the most important source material of the corresponding peat consisted of 60 to 80 % tree-like lycopod plants. Their trunks were still hardly made of wood, but had a very thick periderm (bark). In the middle Upper Carboniferous of the Appalachians the strongly woody cordaites dominated. In the Late Upper Carboniferous of Euramerica, again weakly woody tree ferns of the order Marattiales predominated. The economically important lignite deposits of Central Europe (Lower Rhine, Central Germany, Lower Lusatia, Egergraben) were formed in the "Tertiary" between 66 and 2.588 million years ago and are thus much younger.
Depending on the palaeogeographical position of the formation area, a distinction is made between palustrine (or limnic) and paralic coal formations. Palustrine/limnic means coal formations in wetlands near inland waters. Paralic means that the coal deposit originates from bog formations in a coastal plain. Between the individual coal seams, marine sediments are then repeatedly intercalated, which can be traced back to short-term transgressive phases. If coal deposits have their origin in palustrine formation areas within basins in mountainous regions, one can speak specifically of intramontane coal formations.
New research suggests a close link between the formation of the enormously productive Carboniferous coal deposits and the evolution of white rot, that is, fungal species that were able to degrade lignin, a major component of wood. Molecular genetic relationship analyses in conjunction with the molecular clock method revealed that white rot probably arose only at the end of the Carboniferous or in the early Permian.