what produces carbon dioxide?

Oxygen combining with carbon, as in combustion when the oxygen is in short supply.