Describe how coal was formed. What is this process called?

Coal was formed millions and millions of years ago in swampy forests where some plants died and some grew simultaneously. As the years passed, the layers of dead plants collected one over the other and formed thick layers. With changing weather conditions, more plants grew and the layers of dead plants continued to form deep. Coal is a fossil fuel. The heat and the pressure produced physical and chemical changes in the layers which resulted in the rich carbon content and forced the oxygen into the environment. This rich carbon content became as coal. This process of forcing the oxygen out and leaving behind carbon content was called as carbonisation. In other words, Carbonisation is the process by which plant material or vegetation buried deep under the earth was slowly converted into coal. This is a very slow process and usually, takes millions of years.