Along with other gases like methane and nitrous oxide, CO2 acts like a blanket, absorbing IR radiation and preventing it from leaving the atmosphere. The net effect causes the gradual heating of Earth's atmosphere and surface. [Related: Effects of Global Warming]