Carbon dioxide is a greenhouse gas. It traps heat within the atmosphere, which causes the surface of the earth to heat up, thus contributing to global warming or what is now called climate change.