The basic explanation for why CO2 and other greenhouse gases warm the planet is so simple and has been known science for more than a century. Our atmosphere is transparent to visible light — the rainbow of colors from red to violet that make up natural sunlight. When the sun shines, its light passes right through the atmosphere to warm the Earth.
The warm Earth then radiates some of its energy back upward in the form of infrared radiation — the “color” of light that lies just beyond red that our eyes can’t see (unless we’re wearing infrared-sensitive night-vision goggles). If all of that infrared radiation escaped back into space, the Earth would be frozen solid. However, naturally occurring greenhouse gas molecules, including not just CO2 but also methane and water vapor, intercept some of it — re-emitting the infrared radiation in all directions, including back to Earth. That keeps us warm.
When we add extra greenhouse gases to the atmosphere, though, we increase the atmosphere’s heat-trapping capacity. Less heat escapes to space, more returns to Earth, and the planet warms.
There’s really no scientific doubt about this process, which is known as the greenhouse effect. What scientists don’t know is exactly how strong the effect is. That’s because trapping heat is just the first step. As the planet warms, it changes. Ice on land and on the ocean melts back, letting the Earth absorb more heat than it did before. Oceans warm, but currents carry some of that warm water below the surface, where it’s temporarily hidden away. Oceans also stop absorbing CO2 as easily, so more stays in the atmosphere, adding to the greenhouse effect. The atmosphere itself holds more water vapor when it warms, so concentrations of that greenhouse gas increase. But some of that vapor forms into clouds, which reflect sunlight before it can even hit the Earth.
All of these secondary effects (and more) are known as feedbacks, which can speed up global warming or slow it down. And since they’re not all understood with perfect certainty, scientists can only give a range of likely temperature changes for the next century, not a specific number. There’s wide agreement, though, that the temperature will continue to rise between 0.54°F and 8.64°F above the 1986-2005 average by the end of this century, depending on how our emissions grow (note however, the low number is only possible if we actively suck carbon out of the air). Scientists also agree that the consequences are likely to be severe.