This link explains the process in some detail,
https://en.wikipedia.org/wiki/Air_cycle_machine
"The usual compression, cooling and expansion seen in any
refrigeration cycle is accomplished in the ACM by a
centrifugal compressor, two air-to-air
heat exchangers and an
expansion turbine.
Bleed air from the engines, an auxiliary power unit, or a ground source, which can be in excess of 150 °C and at a pressure of perhaps 32 psi (220 kPa),
[1] is directed into a primary heat exchanger. Outside air at ambient temperature and pressure is used as the coolant in this air-to-air heat exchanger. Once the hot air has been cooled, it is then compressed by the
centrifugal compressor. This compression heats the air (the maximum air temperature at this point is about 250 °C) and it is sent to the secondary heat exchanger, which again uses outside air as the coolant. The pre-cooling through the first heat exchanger increases the efficiency of the ACM because it lowers the temperature of the air entering the compressor, so that less work is required to compress a given air mass (the energy required to compress a gas by a given ratio rises as the temperature of the incoming gas rises).
At this point, the temperature of the compressed cooled air is somewhat greater than the ambient temperature of the outside air. The compressed, cooled air then travels through the
expansion turbine which extracts work from the air as it expands, cooling it to below ambient temperature (down to −20 °C or −30 °C). It is possible for the ACM to produce air cooled to less than 0 °C even when outside air temperature is high (as might be experienced with the aircraft stationary on the ground in a hot climate).
[2] The work extracted by the expansion turbine is transmitted by a shaft to spin the pack's centrifugal compressor and an inlet fan which draws in the external air for the heat exchangers during ground running; ram air is used in flight. The power for the air conditioning pack comes from the reduction of the pressure of the incoming bleed air relative to that of the cooled air exiting the system; typical differentials are from about 30 psi or 210 kPa to about 11 psi or 76 kPa.
[1]
The next step is to
dehumidify the air. Cooling the air has caused any water vapor it contains to condense into fog, which can be removed using a
cyclonic separator. Historically, the water extracted by the separator was simply dumped overboard, but newer ACMs spray the water into the outside-air intakes for each heat exchanger, which gives the coolant a greater
heat capacity and improves efficiency. (It also means that running the ACM on an airplane parked on the tarmac does not leave a puddle.)
The air can now be combined in a mixing chamber with a small amount of non-conditioned engine bleed air. This warms the air to the desired temperature, and then the air is vented into the cabin or to electronic equipment. "