As compression ceases along the aircraft,the air behaves as any refrigerant,expanding,losing the heat of compression,falling below dew point to create the cloud as the water vapor condenses.
The same occurs inside the aircraft,as some air from the compressor section of the engine,as a working fluid, is run through an expansion valve,creating air conditioning for the pilot.