Coal is a solid hydrocarbon compound that is found in natures with a complex composition.
The main organic contents are plants that can be landmarked with bark trails, leaves, roots, wood structure, spores, pollens, resin etc.
Afterward those organic materials go through decomposition causing changes in its physical characteristics and also chemically before and after covered by other sediments.
Basically there are two types of material that form coals, which are:
Combustible Material, are materials that are combustible or can be oxidized. These materials generally consists of Fixed Carbon, Hydrocarbon compounds, Total Sulphur, Hydrogen Compound and other compounds in small numbers.
Non Combustible Material, are materials that are not combustible or cannot be oxidized. These materials are generally shaped by inorganic compounds (Si02, A1203, Fe203, Ti02, Mn304, CaO, MgO, Na20, K20 and other metal compounds in small numbers) which will form the ashes inside the coal. These non combustible materials are generally unwanted because it will lower its combustion value.
In the coal forming process, with help from physico and natural chemistry, cellulose (C49H7O44) which comes from plants will go through changes to become Lignite (C70H5O25), Subbituminous (C75H5O20), Bituminous (C80H5O15) or Anthracite (C94H3O3).
For the next coalification phase with enough time length or through heating process, solid carbon compound will be formed resulting to a higher grade of coals. In this phase, Hydrogne that bound with formed water molecules will be lower.
The concept that coals are shaped from plant leftovers were strengthened with the discovery of plant prints inside the coal layer. In its forming, coals are being enriched with a variety of organic polymer such as carbohydrate, lignin etc. However compositions from these polymers are variative depanding on the species of the composer plant.