Much like the Refrigerator in your kitchen the function of an air conditioner in your car is to help remove the heat and humidity from inside the passenger compartment of the vehicle. The air conditioner system on your car is a "sealed" system like your fridge at home. The difference is your refrigerator does not have the job of moving you down the road where it could get bumpy; it just sits there in your kitchen. Over the years of travels down these roads some of your air conditioner components could become loose and leak some of the refrigerant out causing your A/C not to cool as well as it did when you first got your car.
The system in your car is powered by a belt that drives the air conditioning compressor. Your fridge at home has an electric motor to drive the compressor. The A/C compressor compresses the refrigerant to pressurize it and pump it throughout the system. The refrigerant is pushed through a valve where pressure and temperature are reduced. The now-cool refrigerant travels through the evaporator in the passenger compartment. As a result, cooled air is blown into your vehicle. This refrigerant returns to the compressor, where the cycle begins once again.