An uninterruptible power supply (UPS) is a device that allows a computer to keep running for at least a short time when the primary power source is lost. It also provides protection from power surges.
A UPS contains a battery that "kicks in" when the device senses a loss of power from the primary source. If you are using the computer when the UPS notifies you of the power loss, you have time to save any data you are working on and exit gracefully before the secondary power source (the battery) runs out. When all power runs out, any data in your computer's random access memory (RAM) is erased. When power surges occur, a UPS intercepts the surge so that it doesn't damage the computer.
When power fails the batteries drive the inverter, which continues to run the information technology (IT) load. When power is restored, either from the utility or a generator, the rectifier delivers direct current (DC) to the inverter and simultaneously recharges the batteries. The inverter runs full time. Utility input is completely isolated from the output, and bypass is only used for maintenance safety or if there's an internal electronics failure. Since there is no break in the power delivered to the IT equipment, vacuum fault interrupter (VFI) is generally considered the most robust form of UPS. Most systems synchronize the output frequency with the input, but that's not necessary, so it still qualifies as frequency independent.