The power supply is a device that provides the computer with the proper needed electricity. It is the device in the tower that the power cord plugs into. This device converts AC (alternating current) to DC (directing current). This is necessary because computers run on direct current. In this power supply, there is a fan to keep it cool because electricity often causes heat. In Brief, the power supply takes AC current from the wall plug, converts it into direct current, and puts it into the motherboard, CD-ROM, and other devices in the tower that require electricity. All computers come with power supplies that are suitable for the amount of energy being used by the stock hardware inside of it. When upgrading hardware, like a video card or installing new fans Etc. you must first check the required wattage that the particular piece of hardware uses. If your power supply does not meet these requirements you will also have to upgrade to a new power supply to ensure your computer does not crash. For example, if you have a 400 watt power supply, and you install a new video card that requires 450 watts of energy, you may find your computer crashing when being stressed(watching videos, playing games). If this is the case, do not use the computer until you upgrade your power supply or you remove the piece of hardware that is causing it to crash. This sudden power off of a computer can be detrimental to the internal hardware of the computer.
There are things to protect a computer from electrical problems; they are: -Surge Protectors -Voltage Regulators -and UPS
A surge protector protects the computer from being damaged from high volts every once in a while; spikes or surges.
A Voltage Regulator protects the computer from being damaged by low volts. For example, when the power is lower than usual for a second or two.
A UPS (uninterruptible power supply) protects the computer from power failures. For example, when the power cuts out for a little while. The UPS instantly goes into action and runs the computer for at least five minutes. This gives the user a chance to save all the open work if necessary.
All the aforementioned devices connect between the wall outlet and the power supply.