How does a combustion process produce carbon monoxide?
If combustion occurs in oxygen, (at least) the following reactions are relevant:
$$\ce{C + O2 -&gt; CO2} $$
$$\ce{C + 1/2 O2 -&gt; CO} $$

You can favor the first reaction by having more oxygen in the gas phase, since it required twice $\ce{O2}$ as the first.

However, one of the most important factors is the temperature: high temperature always favors the $\ce{CO}$ product, since reaction wants to proceed fast and react with any available oxygen.
You can clearly see these dependences in the Figure 6 of this article, at low temperatures the CO/CO2 ratio is low, but quickly increases by heating.

More detailed information is easily found in some classical papers, a full PhD thesis on it, or even calculations with modern quantum chemistry methods.