Humidity is the measure of evaporated water in the air. In a humid room you feel as though the temperature is higher than it is. Air conditioners cool and dehumidify the air to increase comfort. When hot indoor air blows across the Freon coils inside your air conditioner, these coils "sweat" humidity in much the same way a cold glass of water sweats in a hot room. This condensation drains down into a condensate pan with a drain, which disposes of the waste water outside your home.
The pan underneath the Freon coils in your air conditioner is delicately balanced so it catches water draining from the coils and drains it out of the unit. If this pan becomes bent or is shaken loose, water can pool in such a way that does not allow draining. When this occurs, water backs up and overflows the pan. When the unit shuts off, all of the excess water on the coils drains into the pan, and it quickly overflows and flows out underneath your unit.
In the center of your condensate pan is a small hole, which is the condensate drain that drains water away from the pan and dumps it outside the air conditioner case. If this drain becomes clogged, as can happen if your air conditioner is run for a prolonged period of time without a filter, water can back up out of the drain and overflow the pan. Use a small pipe cleaner or paperclip to ensure there is no debris or hair accumulated in the first few inches of the drain.
Window air conditioners are designed to be installed on a slight slope, away from your house, which allows condensation to pool and drip from the back of your unit, outside your home, and not flow back in through your window. If your window air conditioner is not properly seated on the windowsill, it can cause a malfunctioning condensate drain system. Verify that your air conditioner is seated flush against the windowsill and has a slight downward slope away from the house if viewed from the outside.