Engine Pressure
Air to pressurize an airliner is compressed by its engines. Jet turbofans produce thrust for flight by compressing air, injecting fuel and igniting the mixture in the combustion chamber. Some of that compressed air, known as "bleed air," is diverted from the turbofan's high-pressure compressor stage just before fuel is injected. Air straight from a jet engine is hot, so before being utilized for cabin pressurization, it's routed through an intercooler and expansion turbine to lower its temperature.
Cabin Pressure Controller
The temperature-controlled compressed air is then channeled to a manifold where it enters the cabin for pressurization. The amount of pressurization is set by the cabin pressure controller in the cockpit. Before taking off, the pilot enters the cruising altitude into the controller. As soon as the plane is airborne, the controller gradually modulates cabin pressure so there are no abrupt changes even as the aircraft quickly gains altitude. The cabin pressure controller accomplishes this by adjusting the position of the outflow valve.
Outflow Valve
A structurally reinforced, rectangular port usually located on the lower rear quarter of the aircraft, the outflow valve vents air pressure from within the cabin. As the plane gains altitude, it incrementally closes to build pressure within the cabin. When the plane is at a typical cruising altitude of 35,000 feet, the cabin pressure controller keeps the output valve positioned to maintain cabin pressure -- also known as "cabin altitude"-- at the equivalent of 6,000 to 8,000 feet, depending on the aircraft. This is comparable to breathing the air in a mountainous area on the ground and easily tolerated by most passengers.
Landing
As the airliner begins its descent for landing, the pilot enters the destination airport's altitude into the cabin pressure controller. The controller incrementally opens the outflow valve to bleed out pressure as the plane descends so the cabin altitude matches the altitude of the destination as the plane touches down. The adjustment is so uniform that, except for some occasional ear-popping, the transition back to ground-level pressure is unnoticeable to most passengers.