where did coal formation take place

Coal formation took place in swamps and marshes during the Carboniferous period, approximately 300 million years ago. The process involved the accumulation of plant material, which was then buried and subjected to high pressure and temperature over millions of years, eventually transforming into coal.