Plant matter in mires and wetlands, such as ferns, shrubs, vines, trees, and algae dies and accumulates on the surface. Initially, the organic matter is decomposed by bacteria, yielding carbon dioxide and methane
The plant matter becomes buried and is no longer exposed to air. Anaerobic bacteria then start to decompose the material. Burial and accumulation can occur for several thousands of years, producing several meters of partially decayed plant matter known as peat .
Continued burial, resulting in increasing pressures and temperatures, causes this low quality lignite coal to be transformed into higher quality "black coals". First lignite becomes sub-bituminous coal, then bituminous coal, and finally the highest quality anthracite coal. As these transformations occur, the amount of water and other compounds in the coal decreases and the coal becomes more dense. Along with this comes a higher carbon concentration.
To get coal, it needs to be mined. In the Olden Days, Coal was mined manually, however now, due to health hazards, it is mined by machine.
And that is how you get coal, which you use for energy, fuel and vital components in the steel and concrete industry.
Natural Gas is formed the same way as Crude Oil and is used as a source of energy for heating, cooking and electricity generation. It is also used as a chemical feedstock in the manufacturing of plastics.