Coal is formed when ancient peat forests are buried and compressed over time.
The way coal forms is similar to . Coal is formed when ancient peat forests are buried and compressed over time. Over millions of years heat and pressure cause the buried organic matter to coal. As the temperature increases carbon dioxide oxygen nitrogen are released and the proportion of carbon increases. Eventually what remains is a layer of coal that is much thinner than the layer of peat that the foal formed from.
See this related Socratic question on and why .