Some trees have been growing in tropical rainforests like the Amazon Basin for hundreds of years. They store almost half their weight in carbon. So trees help reduce global warming in a way, but with people producing so much extra carbon dioxide global warming is happening.
Trees probably have other effects on the environment and global warming, but I only know what is above. Hope it helps :)
Yes, living trees breathe in carbon dioxide. But when they die, they ROT, and when they rot, all the carbon they stored over the years will be oxidized and released into the atmosphere as carbon dioxide. Well, not ALL of the carbon. Some part of it will be transferred to the soil. But in places like the Amazon Rain Forest, the soil is too thin to hold much carbon, so very little goes into the soil and what little does is rapidly released into the atmosphere as carbon dioxide.
On the other hand, if, instead of allowing trees to die and rot, we were to HARVEST the trees, turn them into lumber, and treat them to prevent rot, the carbon therein would be sequestered (prevented from oxidizing into the carbon dioxide in the atmosphere) almost indefinitely.