Most uninterruptible power supplies contain a surge protector to protect your electronics should an electrical surge happen such as a lighting strike from a thunder storm. An uninterruptible power supply can protect your computer, or anything connected to it, from the changes in voltages coming from the power line. That is the essence of what a surge protector does. Although a UPS can do that and supply backup battery power to your computer in the event your house looses electricity.With an uninterruptible power supply, you can get battery life that ranges from half an hour to a whole hour of life.
Every UPS is, by definition, a big battery and a voltage inverter that converts DC power from the battery to give to your computer in AC form. However, not all UPSs work the same. With a basic UPS, you can get something like 300 watts of power to supply a fairly low end desktop computer and monitor for a few minutes before it crashes. It would also have a surge protector for protection against surges. But if you had a higher end UPS such as one that has 900 to 1000 watts of power, you can actually power a high end gaming system with a 30" monitor for ten minutes or so.
A high-end uninterruptible power supply usually includes something like an online system called a Line Interactive UPS. But lower-end uninterruptible power supplies usually don't, making them an offline UPS. With an offline UPS, you're taking the main voltage from your house and you're feeding that directly into your computer unless it goes off or plummets substantially. With an online UPS, it can handle a brown out or an occasional spike and can adjust on the fly without switching to battery mode and without exposing your computer to the harmful electricity from the power line. A brown out is when something is plugged into your house and takes enough power to cause, say, your lights to flicker a bit. Your computer will be protected from that when connected to an online uninterruptible power supply.
When a UPS starts to kick in, you can hear a bit of a ticking noise. This means that some kind of a brown out or voltage irregularity is taking place in your house's power line. Over time, such electrical anomalies can cause minute damage that shortens the life of your computer which can also lead to dead hardware. A UPS can be incredibly important for protecting the hardware in your computer. It is also useful for giving you ample time to save your unsaved work should a power outage occur.