Oxygen is produced by trees through photothnthesis and carbon dioxide is prodeced by mammals and other things breathing it out or burning fule.