A UPS sits between the mains and your equipment. When power drops or fluctuates, it switches to battery instantly — the server, network and camera recorder stay on.
A UPS gives equipment time: to keep working through short outages, and to shut down cleanly, without data corruption, during long ones. For that, the UPS must “talk” to the server over the network or a USB cable.
Example
During a flicker the server and router keep running on the UPS; in a long outage the server shuts down automatically and safely.