The fundamental purpose of an Uninterruptible Power Supply (UPS) is to provide an uninterruptible source of power for the equipment it protects. An electric device plugged into the wall has only one source of power. If there is a blackout, the electricity is cut and the device obviously goes off immediately. A UPS changes this equation by providing its equipment two sources of power.
UPSes are designed so that there is one source of power that is normally used, called the primary power source, and another source that kicks in if the primary is disrupted, called the secondary power source. The power from the wall is always one of these sources, and the battery contained within the UPS is the other. A switch is used to control which of these sources powers the equipment at any given time. The switch changes from the primary source to the secondary when it detects that the primary power has gone out. It switches back from the secondary power source to the primary when it detects that the primary power source has returned.
UPSes come in many different sizes and shapes. The size of the UPS is primarily dictated by the size of the battery; the larger the battery, the more time your equipment can run on battery power before shutting down. Larger units not only can power equipment for more time, they can also handle a larger total demand for power.