They bring the air with them. Think about it like SCUBA diverers, who explore the oceans, they bring their oxygen with them. When we have a permanent station on the Moon, it will probably be provided the same way that the ISS does it, along with the cracking of rock for water.
Electrolysis of water (H2O) is the main method to generate oxygen aboard the ISS. Water is split into oxygen (O2) and hydrogen (H2). The oxygen is vented into the breathable cabin air system, known as the Oxygen Generation System, while the explosive hydrogen is vented externally.
The station’s football-field-sized solar arrays are the power source to electrolyse the water. Each day the OGS continuously provides between 2.3 and 9kg (5 to 20lbs) of oxygen. The OGS is a component of the ISS life support system, known as ECLSS or Environmental Control and Life Support System, located in the US Destiny module. The Elektron system aboard the Russian Zvezda service module performs the same vital electrolysis service for the ISS crew. The Electron system was also used aboard the Russian Mir Space Station.
Pressurised oxygen storage tanks replenished by visiting unmanned cargo ships provide a backup to the electrolysis method. Finally, the crew can also generate oxygen chemically by igniting Solid Fuel Oxygen Generation (SFOG) canisters comprised of lithium perchlorate. Each canister provides the oxygen needed to support one crew member for one day.