When a hydrocarbon is burned it is called combustion. A hydrocarbon is a chemical that contains only carbon and hydrogen atoms (like octane). When burned in the presence of oxygen from the atmosphere, the carbon becomes oxidized. Complete combustion always produces only carbon dioxide and water vapor as the products. For complete combustion to occur, plenty of oxygen must be present and there must be adequate ventilation for the oxygen to reach the burning fuel. In reality, the atmosphere is composed of mostly nitrogen gas and not all of the burning material has access to excess oxygen so we often get incomplete combustion which produces carbon monoxide as a product as well. This is dangerous since CO2 is non-toxic but CO is a dangerous asphyxiant and the two cannot be distinguished by sight or smell. So in ideal conditions, complete combustion will occur and produce only CO2 but in reality incomplete combustion will occur and produce both CO2 and CO.
When carbon reacts with oxygen it forms carbon-dioxide.
is a non-metal.
Carbon monoxide (CO) is iso-electronic with nitrogen (N2) and formed through the incomplete combustion of carbon or hydrocarbon compounds.
Carbon monoxide is also very toxic; however, it is colorless, odorless, tasteless and non-irritating all of which increase its danger. The incomplete combustion of hydrocarbon (natural gas or heating oil) or carbon sources (coal or charcoal) is a common hazard in the home. In a closed environment (e.g., charcoal grill in room with no, or poor, ventilation) as carbon uses up oxygen in room the formation of toxic carbon monoxide results instead of carbon dioxide (CO2).