This article in Nature discusses the length of time it's likely that CO2 stays up in the air. It's a very long time. Some of it stays around for thousands and thousands of years.
Some people find it hard to understand why CO2 makes a difference to warming. (I've already outlined a simple description of why the earth is warming.)
CO2 warms the earth because of its greenhouse properties. Greenhouse gases are the ones that stop the earth from turning into an ice block. They keep us nice and warm so that we can grow crops, go swimming and do a host of things that would be impossible if the earth was too cold.
Because we keep adding CO2 to the atmosphere by digging up fossil fuels and removing trees, the earth is getting warmer. Because the earth is getting warmer, the amount of water vapour in the air increases. Water vapour in the air can't be seen. It's just another gas.
When water vapour condenses, it forms clouds and we can certainly see clouds but that's no longer water vapour. Clouds are made up of drops of liquid water or ice. Clouds don't have a greenhouse effect as such. Some of them cool the earth and some of them warm the earth. On balance, they don't make much difference to the temperature overall.
Water vapour, on the other hand, is another greenhouse gas so it also makes the earth warmer. That means that now there are two gases that have increased in the air, making the earth warmer - the extra water vapour plus the extra CO2. So the earth gets even warmer than if only one of these greenhouse gases was increasing.
If the earth wasn't getting warmer, the amount of water vapour on average wouldn't change. In fact, water vapour recycles through the air every few days. So if we could cool the earth a bit the amount of water vapour would lessen and the temperature of the earth would drop back to what it used to be like a few years ago.
Unfortunately, it's not easy to cool the earth. One way would be to soak up the extra CO2 in the air. Some scientists are working on how this could be done. But at the moment even if it could be done it's expensive and could have unwanted effects. In any case, we'd have to soak up more than we're putting up in the air to make any difference.
That's why, for now, the best thing to do is to switch over to renewable energy sources as soon as we can, and stop digging up fossil fuels.
For more information on climate change, check out the links on this site.