The air conditioning system in a car works by manipulating refrigerant between a liquid and a gaseous state. As the refrigerant changes states, it absorbs heat and humidity from the vehicle and allows the system to give off cool, dry air.
Watch the video below to get a better understanding.