The primary function of a solar charge controller is to protect your battery bank from being over-charged by your solar array. Charge controllers continually monitor battery voltage, solar array voltage and output current and ensure your batteries get correctly charged. Moreover, most charge controllers will manage 3, 4 or 5 different stages of battery charging cycles to properly charge your batteries at different times and battery voltages. The most common battery charging cycles are:
Bulk Charge - This first stage of battery charging is used whenever your batteries are low on energy. Most charge controllers automatically begin bulk charging as soon as power is drawn from the battery bank. In this stage, current is sent to the batteries at the maximum safe rate they will accept until voltage rises to near (80-90%) full charge level.
Absorption Charge: This 2nd stage of battery charging is used to safely bring your battery bank up to 100%. Voltage remains constant and current gradually tapers off as internal resistance increases during charging.
Float Charge: The 3rd stage of battery charging is a "maintenance" charge cycle. After your batteries have reached full charge, charging voltage is reduced to a lower level (typically 12.8 to 13.2) to reduce gassing and prolong battery life. It's main purpose is to keep an already charged battery from discharging. PWM, or "pulse width modulation" accomplishes the same thing. In PWM, the controller or charger senses tiny voltage drops in the battery and sends very short charging cycles (pulses) to the battery. This may occur several hundred times per minute. It is called "pulse width" because the width of the pulses may vary from a few microseconds to several seconds.
The following illustration shows how a typical three stage charge controller works (illustration courtesy of Xantrex Technologies):