About 300 million years ago, the earth had dense forests in low-lying wetland areas. Due to natural processes, like a floods, these forests got buried under the earth surface. As more soil deposited over them, they were compressed. The pressure also rose as they sank deeper and deeper. Under high temperature and high pressure, dead plants got slowly converted into coal.