High altitude atmosphere has lower oxygen level. How do aircraft, especially the military ones, prevent engine flameout?
The oxygen level at high altitude is the same as at sea level, namely 20.95%. What is lower is the oxygen pressure.
To avoid flameout, pilots must avoid to throttle the engine down too much, so a minimum pressure in the combustors can be maintained.
Designers can increase the altitude performance by building longer combustors. The speed of ignition is pressure dependent, and with lower pressure it takes longer for the fuel-air-mixture to ignite. More length allows more mixing and leaves the mixture more time to react. Also, they can add flame holders which leave pockets of burning fuel close to the injection nozzles, so the mixture is heated more rapidly and ignites more reliably. Normally, flame holders create drag and are reduced to the minimum necessary.
At high altitude, aircraft engines have a number of built in safeguards to prevent flameout, like,
The engine igniter is on continuously. This continuous ignition is set automatically by the FADEC if flameout conditions are detected.
In case flameout occurs, the FADEC tries to restart the engine automatically (in response to loss of thrust, for example).
The engines also have compressor bleed valves, which serve to prevent compressor stall in case a sudden increase in thrust is demanded from the engine.
Also, as Peter says, at high altitude, the percentage of oxygen remains the same, but the partial pressure is less.