To simplify it right, right down. It condenses a gas to a liquid and squirts it into a low pressure environment. The liquid vapourises taking in large amounts of engergy (heat) & thusly stuff gets cold. Its then condensed again and sent around in a loop.