"People look at a tree and think it comes out of the ground," but "trees come from air."A tree is around 50% carbon atoms by mass, and these carbon atoms come from carbon dioxide (CO2) in the air. Carbohydrates, which form most of the substance of the tree, are formed by breaking a carbon-oxygen bond in CO2 and combining it with water, which condensed from clouds in the air to form rainfall.
Since, energetically, carbon atoms would prefer to stay as CO2 instead of reside in carbohydrates, it takes energy to rip apart a C-O bond. Trees get the energy to do this synthesis of carbohydrates from the sunlight (photons)-- hence photosynthesis. In the process, oxygen (O2) is released.
When we put a log in the fireplace and provide heat to kickstart the reverse reaction, the oxygen from the air grabs the carbon atoms back from the log to make CO2 and water again (combustion). Because carbon loves to be in CO2 the fire spontaneously carries on. The extra energy it took to break the C-O bonds in the first place is released as light and heat. In a sense, the sunlight is being emitted back out to complete the balanced cycle.
Famous physicist Richard Feynman explains this in such a riveting way:
What does this mean for the environment? Around 45% of our CO2 emissions are from burning fossil fuels. But a sizeable portion, 17%, is from deforestation.  When we clear land for agriculture or for buildings and burn the trees, CO2 that was once stored in the trees gets released back into the atmosphere to cause global warming. One action we can take is minimize deforestation to prevent further release of CO2 from the incumbent trees.
|A rotting tree releases CO2 back into the atmosphere.|
So carbon dioxide is food for a growing tree, and, as a tree grows, it acts as a carbon sink since it takes carbon dioxide out of the air and stores it in its trunk. Planting a new tree can thus offset some of our CO2 emissions. But, given that we plant a new forest on a piece of land, how much of an impact can we make? A square meter of tree cover can sequester 0.306 kg of carbon per year.  The average passenger vehicle in the US consumes roughly 1300 kg of carbon per year.  This means that, to offset the CO2 emissions from one vehicle, one would need to maintain 4,250 m2 of growing trees. For comparison, an American football field is 5,300 m2.
I added the word 'growing' in front of 'trees' in my discussion above. Actually, a mature forest does not absorb much CO2. When trees die, fall over, and rot-- a natural process in a mature forest-- micro-organisms decompose the rotting tree, releasing the CO2 once stored in the tree trunk back into the atmosphere. A mature forest is in a kind of equilibrium, where new trees can grow and sequester CO2 only to take the place of an older, fallen tree which is emitting CO2.
Therefore, to make a substantial impact on offsetting anthropogenic CO2 emissions, we must plant new forests while maintaining the ones we have. That is, we can't count on the mature forest land we have today to keep working hard to eventually absorb all of the the CO2 that we emit. One way to retain the structure of a tree that has been cut down is by turning it into lumber. This helps perpetuate it as a carbon sink. However, keep in mind that a tree must be transported and processed to be turned into lumber. This takes energy and releases more carbon. Only if this carbon is less than that stored in lumber is this a net negative CO2 emitting process.
 Nowak et. al. Carbon storage and sequestration by trees in urban and community
areas of the United States. 2013.