Carbon dioxide works as a blanket in the atmosphere and traps heat in the air. The CO2 blanket in the air prevents the earth from cooling and causes global warming. So, it is one of the major causes of global warming.