How does an Uninterruptible Power Supply (UPS) work?