An oxygen concentrator is the most complex machine out of the three explored here. The mechanism within small to medium sized oxygen concentrators works like this. There is a class of minerals called zeolite. Certain types of zeolite will absorb nitrogen when under pressure. Pressurized air is injected into a chamber filled with zeolite which captures the nitrogen and lets oxygen through. Then the chamber is depressurized and the contents vented through an exhaust. Then the process starts again.
Warning: An oxygen concentrator can pose dangers if not used properly. You can suffer from oxygen toxicity which can result in nausea, convulsions or even death. It can cause severe damage to your lungs, eyes, and nervous system.