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.
UPS in the data center
Every UPS converts incoming AC to DC through a rectifier, and converts it back with an inverter. Batteries or flywheels store energy to use in a utility failure. A bypass circuit routes power around the rectifier and inverter, running the IT load on incoming utility or generator power