Nitrogen oxides-or NOx for short -are formed at high temperature combustion when nitrogen in the  air (which is otherwise generally inert in the atmosphere) along with nitrogen in the material being burned reacts with oxygen.