As this process continues over millions of years, the buried organic material undergoes a transformation. The oxygen and hydrogen content in the material gradually diminishes, while the carbon content increases. This results in the formation of peat, which is the precursor to coal. With further heat, pressure, and time, peat is transformed into lignite, a low-rank coal. Further exposure to heat and pressure turns lignite into bituminous coal, a higher-rank coal, and eventually into anthracite, the highest rank of coal.
Therefore, coal is often called "buried sunshine" because it represents ancient plants and trees that captured and stored sunlight through photosynthesis millions of years ago. When we use coal as a fuel source, we are essentially releasing the energy that was once stored as sunlight in these ancient plants.