Carbon dioxide is a greenhouse gas that absorbs infrared radiation from the sun and traps heat in Earth's atmosphere, causing the greenhouse effect and increasing global temperatures. Oxygen, noble gases, and nitrogen do not have significant infrared-absorbing properties like CO2 does.