Coal is a fossil fuel which adds to global warming
Plants use energy from the sun to grab or 'fix' carbon from the carbon dioxide in the air. They obtain hydrogen from water and stick the carbon, hydrogen and some oxygen together to make carbohydrates. They use these carbohydrates to grow (they are largely made of carbohydrates) and to live off or metabolise (Sugar is a carbohydrate). This fixing of carbon is the basis for most life on earth. Nearly everything either does what these plants do or feeds off the plants.
When a plant dies, is eaten, or is burnt (like wood from a tree) the carbon that makes up the plant ends up being released into the atmosphere again. All in all the plant gave out the same amount of carbon dioxide that it releases and so there is no net increase in atmospheric carbon dioxide levels. Burning or eating plants is therefore 'carbon neutral'*.
* Being pedantic burning or eating plants is often not completely carbon neutral as fertilisers (made using electricity from fossil fuels) are often used as well as tractors and other forms of machinery and transportation (all generally running off fossil fuel energy).
Coal is formed from partially decomposed plants that lived millions of years ago you can read more about how coal is formed.
This means that much of the carbon that these plants absorbed and fixed is still there in the coal. Coal and other fossil fuels are all carbon stores. They are like a bank where a lot of carbon dioxide was deposited millions of years ago. When we burn coal (or other fossil fuels) we release this carbon back in the atmosphere as carbon dioxide and carbon monoxide. This raises the atmospheric level of carbon dioxide which contributes** to the greenhouse effect.
It is therefore greener to burn sustainably sourced wood than it is to burn coal or oil or gas.
** = > 97% likely