As time passed, layers of sand and mud settled from the water over some of the peat deposits. The pressure of these overlying layers, as well as movements of the earth's crust and sometimes volcanic heat, acted to compress and harden the deposits, thus producing coal. Various types of coal are classified according to fixed carbon content. Peat, the first stage in the formation of coal, has a low fixed carbon content and a high moisture content. The carbon content is greater in lignite , the lowest rank of coal.
Bituminous coal has even more carbon and a correspondingly higher heating value.
Anthracite coal has the highest carbon content and heating value. Coal may be transformed by further pressure and heat into graphite that is almost pure carbon. Other components of coal are volatile hydrocarbons, sulfur and nitrogen, and the minerals that remain as ash when the coal is burned. Some products of coal combustion may have detrimental effects on the environment. Burning coal produces carbon dioxide, among other by-products.