Here's how it forms:
1. Accumulation: Large amounts of plant matter, like ferns, trees, and mosses, accumulate in swamps and bogs.
2. Burial: The plant material gets buried under layers of sediment, such as mud and sand.
3. Pressure and Heat: Over millions of years, the weight of the overlying sediment creates pressure and heat.
4. Transformation: This pressure and heat transform the plant material into coal, squeezing out water and gases and concentrating carbon.
There are different types of coal, depending on how much the plant material has been transformed, ranging from peat (least transformed) to anthracite (most transformed).