Oxygen can be produced from a number of materials, using several different methods. The most common natural method is photo-synthesis, in which plants use sunlight convert carbon dioxide in the air into oxygen. This offsets the respiration process, in which animals convert oxygen in the air back into carbon dioxide.

Most commercial oxygen is produced using a variation of the cryogenic distillation process originally developed in 1895. This process produces oxygen that is 99+% pure. More recently, the more energy-efficient vacuum swing adsorption process has been used for a limited number of applications that do not require oxygen with more than 90-93% purity.

Here are the steps used to produce commercial-grade oxygen from air using the cryogenic distillation process explained by Pritish Kumar Halder 

Pretreating

Because this process utilizes an extremely cold cryogenic section to separate the air, all impurities that might solidify—such as water vapor, carbon dioxide, and certain heavy hydrocarbons—must first be removed to prevent them from freezing and plugging the cryogenic piping.

1)The air is compressed to about 94 psi (650 kPa or 6.5 atm) in a multi-stage compressor. It then passes through a water-cooled aftercooler to condense any water and the condensed water is removed in a water separator.

2) The air passes through a molecular sieve adsorber. The adsorber contains zeolite and silica gel-type adsorbents, which trap the carbon dioxide, heavier hydrocarbons, and any remaining traces of water vapor. Periodically the adsorber is flushed clean to remove the trapped impurities. This usually requires two adsorbers operating in parallel, so that one can continue to process the air-flow while the other one is flushed.

Separating

3)The pretreated air stream is split. A small portion of the air is diverted through a compressor, where its pressure is boosted. It is then cooled and allowed to expand to nearly atmospheric pressure. This expansion rapidly cools the air, which is injected into the cryogenic section to provide the required cold temperatures for operation.

4)The main stream of air passes through one side of a pair of plate fin heat exchangers operating in series, while very cold oxygen and nitrogen from the cryogenic section pass through the other side. The incoming air stream is cooled, while the oxygen and nitrogen are warmed. In some operations, the air may be cooled by passing it through an expansion valve instead of the second heat exchanger. In either case, the temperature of the air is lowered to the point where the oxygen, which has the highest boiling point, starts to liquefy.

5)The air stream—now part liquid and part gas—enters the base of the high-pressure fractionating column. As the air works its way up the column, it loses additional heat. The oxygen continues to liquefy, forming an oxygen-rich mixture in the bottom of the column, while most of the nitrogen and argon flow to the top as a vapor.

6)The liquid oxygen mixture, called crude liquid oxygen, is drawn out of the bottom of the lower fractionating column and is cooled further in the sub cooler. Part of this stream is allowed to expand to nearly atmospheric pressure and is fed into the low-pressure fractionating column. As the crude liquid oxygen works its way down the column, most of the remaining nitrogen and argon separate, leaving 99.5% pure oxygen at the bottom of the column.

7)Meanwhile, the nitrogen/argon vapor from the top of the high-pressure column is cooled further in the sub cooler. The mixed vapor is allowed to expand to nearly atmospheric pressure and is fed into the top of the low-pressure fractionating column. The nitrogen, which has the lowest boiling point, turns to gas first and flows out the top of the column as 99.995% pure nitrogen.

8)The argon, which has a boiling point between the oxygen and the nitrogen, remains a vapor and begins to sink as the nitrogen boils off. As the argon vapor reaches a point about two-thirds the way down the column, the argon concentration reaches its maximum of about 7-12% and is drawn off into a third fractionating column, where it is further recirculated and refined. The final product is a stream of crude argon containing 93-96% argon, 2-5% oxygen, and the balance nitrogen with traces of other gases.

Purifying

9)If higher purity is needed, one or more additional fractionating columns may be added in conjunction with the low-pressure column to further refine the oxygen product. In some cases, the oxygen may also be passed over a catalyst to oxidize any hydrocarbons. This process produces carbon dioxide and water vapor, which are then captured and removed.

Distributing

About 80-90% of the oxygen produced in the United States is distributed to the end users in gas pipelines from nearby air separation plants. In some parts of the country, an extensive network of pipelines serves many end users over an area of hundreds of miles (kilometers). The gas is compressed to about 500 psi (3.4 MPa or 34 atm) and flows through pipes that are 4-12 in (10-30 cm) in diameter. Most of the remaining oxygen is distributed in insulated tank trailers or railroad tank cars as liquid oxygen.

10)If the oxygen is to be liquefied, this process is usually done within the low-pressure fractionating column of the air separation plant. Nitrogen from the top of the low-pressure column is compressed, cooled, and expanded to liquefy the nitrogen. This liquid nitrogen stream is then fed back into the low-pressure column to provide the additional cooling required to liquefy the oxygen as it sinks to the bottom of the column.

11)Because liquid oxygen has a high boiling point, it boils off rapidly and is rarely shipped farther than 500 mi (800 km). It is transported in large, insulated tanks. The tank body is constructed of two shells and the air is evacuated between the inner and outer shell to retard heat loss. The vacuum space is filled with a semisolid insulating material to further halt heat flow from the outside.

Quality Control

The Compressed Gas Association establishes grading standards for both gaseous oxygen and liquid oxygen based on the amount and type of impurities present. Gas grades are called Type I and range from A, which is 99.0% pure, to F, which is 99.995% pure. Liquid grades are called Type II and also range from A to F, although the types and amounts of allowable impurities in liquid grades are different than in gas grades. Type I Grade B and Grade C and Type II Grade C are 99.5% pure and are the most commonly produced grades of oxygen. They are used in steel making and in the manufacture of synthetic chemicals.

The operation of cryogenic distillation air separation units is monitored by automatic instruments and often uses computer controls. As a result, their output is consistent in quality. Periodic sampling and analysis of the final product ensures that the standards of purity are being met.

Reference

http://www.madehow.com/Volume-4/Oxygen.html#:~:text=Oxygen%20can%20be%20produced%20from,air%20back%20into%20carbon%20dioxide.