The formation of coal is associated with heat and pressure. Coal is formed over millions of years from the remains of dead plants and organisms that are buried under sediment and subjected to high temperatures and pressure. This process, known as coalification, results in the transformation of the organic matter into coal. As the temperature and pressure increase, the coal becomes more dense and carbon-rich. Therefore, the primary factor that drives the formation of coal is the long-term accumulation of organic material and the subsequent heat and pressure that cause it to transform into coal.