NOx is primarily formed during the combustion of fossil fuels in vehicles, power plants, and industrial processes. High temperatures during combustion facilitate the reaction between nitrogen and oxygen in the air, producing NO and NO2. Other sources include agricultural activities and certain natural processes, such as lightning.