Plant Carbon Cycle 101: This aint easy to grasp IMO.
Photosynthesis: Takes Sun Light plus Carbon Dioxide plus water, and generates glucose (sugar, a partial oxidized hydrocarbon) and it generates oxygen. Think of it as method of storing sun light energy away for later usage.
6 (CO2) + 6 (H2O) + SunLight -> C6H12O6 + 6 (O2)
Cellular Respiration: Plants and animals do this. The cells take the stored glucose sugars plus some oxygen. They fully oxidize the glucose, just like burning gas. This generates Carbon Dioxide (CO2) and Water. So, the plant expells carbon dioxide during the night, and absorbs during the day, roughly.
C6H12O6 + 6 (O2) -> 6 (CO2) + 6 (H2O)
Wiki
As a sum total, plants absorb more carbon dioxide than they expel. About 1/4 of a trees weight is carbon, 1/2 is water, the rest is all the other stuff plus ash. Most of that carbon is released when a tree burns. Think how heavy a green tree is, then think 1/4 of that weight is the carbon, which is atomic weight 12, plus two oxygen atoms which are atomic weight 16 = atomic weight 44. So believe it or not, 91% of the weight of the tree is released as carbon dioxide. When a tree falls and decays, most of the carbon is released as carbon dioxide.
When a plant breaks down it release Methane (CH4), which is around 20 times more important (more effective) as a greenhouse gas. So, every pound of Methane is worth twenty pounds of carbon dioxide. Methane is produced by the natural decay of organic materials in a oxygen free environment, such as underground. That's were natural gas comes from.