How is the air conditioning system on airliners powered? I expect that the air conditioning is powered by the APU powers, but I wonder if there are other power sources used like the main engines?
What powers the airconditioning on most airliners is APU or main engine compressor bleed, which is being supplied at fairly high pressure, say, 80 psi, and temperature, around 3-400F, to the air conditioning packs. You normally have a choice to select APU or main engine bleed. You will obviously use APU bleed on the ground before engine start, but also may opt to take off with APU bleed running the air conditioning instead of the engines for slightly better takeoff performance. On some airplanes, packs on APU bleed can be a requirement for departures in icing conditions because of the performance drain of bleed being used for anti-ice and air conditioning at the same time.
Large jet aircraft (and large turboprop) air conditioning doesn't use a gas vapour cycle like regular air conditioners (some smaller jets and turboprops, that can't produce the bleed flow, as well as piston a/c do however); they get the same result using just the high pressure, high temperature bleed air using a "bootstrap effect", where air is cooled off while still at high pressure, than letting it drop close to ambient pressure after a lot of the heat has been removed, resulting in air that can be very cold.
At the pack, part of the flow gets chilled and part gets bypassed while still hot. Temperature regulation is by mixing the chilled flow and bypass flow. Electrical power is only required for the control system.
The air being chilled goes through an Air Cycle Machine. An ACM takes high pressure air, drops the temperature using heat exchanger pre-coolers (air-to-air radiators) while the pressure is still high, boosts the pressure and temperature again with a compressor, takes out some of the heat from that pressure boost with more heat exchangers, and you end up with air that is still at high pressure but the temperature is way less than the original bleed. Then you suddenly let the pressure drop close to ambient by allowing it to expand into a much larger discharge duct.
Air that started off at 80 psi and 400F is now down to 150F while still at 80 psi. When you let it drop to ambient, the temperature drop from the pressure drop will take the ACM discharge temperature down to just above freezing (theoretically, if you put all the bleed through an ACM, you can get the air down to deep sub-zero temps, but the control system will normally keep the discharge from going below freezing).
The compressor is powered by a turbine in the discharge flow where the expansion temperature drop happens. It's like a big turbocharger unit (the compressor driven by a turbine in the same flow is what constitutes the bootstrap effect). The final temperature that goes to the cabin is a mix of chilled air and hot air that is bypassed from the ACM by the control system.
You may also be able run the system from a high pressure ground bleed air source (called a "Huffer Cart"), but airlines usually use Huffer Carts for engine starting and instead will run ground air conditioning units that connect directly into the aircraft low pressure ducting (when you see the yellow flex pipe hooked up to the fuselage at the gate, that's a ground low pressure air conditioning source).
It's not a normal A/C unit
Aircraft do not use a Freon based compressor vapor-liquid transition heat pump type arrangement the way every home, car, boat and train does.
They use a simpler cycle, because most turbine aircraft have a great abundance of compressed air available, or are obliged to have compressors anyway for pressurization.
The compressed-air A/C cycle
Consider the lowly shop compressor, mainstay of every auto paint shop, auto repair shop, car restorer and metal shop. When you compress air, it gets hot. Compressing to 135 PSI (10 bar) increases the density of the air by 10 times, which puts all that air's heat in 1/10 the space. It also puts the air's humidity in 1/10 the space, only possible because hot air holds more water. Then, the compressor has cooling fins or an intercooler to cool the air. This reduces the air's ability to hold moisture, and most of the water condenses.
The reverse happens when the compressed air is released (decompressed). There's too little thermal energy for too much volume of air, so the air comes out cold. (and dry). If you've ever used an air tool, you notice they get cold.
Of course, we don't need 10 bar of compression to get this effect; that was just an example of a shop compressor.
In the aircraft
It is the nature of turbines that they compress very large quantities of air for combustion. It's no trouble to tap the compressor stages to obtain "bleed air" for HVAC uses.
Similar to a shop compressor, an intercooler is used to cool and dry the typically 150C bleed air. This is is fairly complex but outside air (ram air; or on the ground, blown by a fan) is used as a heat sink. Now you have compressed air at around 3 bar and roughly ambient temp.
When this is allowed to de-compress to cabin pressure, it cools considerably - as low as -20C. This is too cold for comfort, so hot (non-intercooled) bleed air is mixed in to achieve the desired temperature.
The running engines power commercial airliner interior climate and environmental control through their built in electrical generators and bleed air systems. The units that supply the interior air in the correct temperature and pressure for passengers are sometimes called PACK as an acronym for Pneumatic Air Cycle Kit.
When the engines are off, the APU (Auxiliary Power Unit) takes over the duties of supplying electricity and bleed air. If an APU is not used, electricity is supplied by a GPU (Ground Power Unit). The climate control is supplied by an outside air conditioning unit temporarily attached to the aircraft.
When the engines are on, neither the APU nor GPU are used nor necessary. The APU is actually turned off when the engines are running. It is an unnecessary drain on fuel.