The compressor compresses the gas refrigerant into a dense hot gas.  But you knew that, didn't you?  How the compressor does that, I don't know, actually.  I'm sure it's interesting, but I'm also sure it's something that most of us can't repair.  So I'm not going to look deeply into it just now.  Suffice to say that the compressor is

The "high pressure side" is the connection that goes to the condenser (it's "high pressure" because it's the compressed gas side).  The "low pressure side" is the connection that comes from the evaporator (it's low pressure because the high pressure liquid has been sprayed through the expansion valve, which reduces the pressure).  The low pressure pipe is the larger of the two that run along the top of the passenger's side fender.

The operation of the compressor is controlled by an electrical clutch.  When the control system determines that the compressor needs to be on, the clutch is energized and connects the rotating pulley to the compressor shaft.  The compressor then pulls gas refrigerant into its low side input, compresses it, and pushes it out the high side output - in as cool gas from the evaporator, out as hot dense gas to the condenser.