You picked a huge topic to dive into....
The power supply Yo-DUH mentions is unregulated, meaning there is no circuit actively controlling the output voltage. Unregulated supplies are okay for motors and such, but not acceptable for a computer - the ouputs are too unstable.
Your PSU uses a switching regulator. Lots of possibilities, lots of complications. For an overview, try this pdf:
Introduction to Power Supplies. While it's
possible to home build a computer power supply, it ain't something many can or will do.
As for the UPS, the three key compenents are a battery charger, a power inverter, and a circuit to switch betwixt line and battery. The cheap inverters sold at the auto parts store or wherever output a 'modified sine wave' - squared off and stepped like was said. These are bad for computers. UPS's use better inverters that output nearly perfect sine waves.
If you build yourself a PSU or a UPS, you should combine the two. That way you could leave out the inverter and the AC to DC stage of the PSU.
Surge protectors: most use either Metal Oxide Varistors (MOV) or SCRs/diacs/triacs/sidacs/thyristors. If your brain isn't fried from power supply goodness, try a search for 'crowbar circuit'.