Something hit me during my last flight: our ears feel that the pressure around us changes quickly during liftoff and landing, they hurt more and more until we make them pop. However, the cabin must maintain a level of oxygen higher than outside the aircraft because it isn't dense enough at ~10km to breathe normally.
Does that mean that the aircraft merely takes air from the outside, heats it up (it's around -40°C outside at 10km) and adds oxygen to it before blowing it inside? How else?