A power supply is a hardware component that supplies power to an electrical device. It receives power from an electrical outlet and converts the current from AC (alternating current) to DC (direct current), which is what the computer requires. It also regulates the voltage to an adequate amount, which allows the computer to run smoothly without overheating. The power supply an integral part of any computer and must function correctly for the rest of the components to work.
You can locate the power supply on a system unit by simply finding the input where the power cord is plugged in. Without opening your computer, this is typically the only part of the power supply you will see. If you were to remove the power supply, it would look like a metal box with a fan inside and some cables attached to it. Of course, you should never have to remove the power supply, so it's best to leave it in the case.
While most computers have internal power supplies, many electronic devices use external ones. For example, some monitors and external hard drives have power supplies that reside outside the main unit. These power supplies are connected directly to the cable that plugs into the wall. They often include another cable that connects the device to the power supply. Some power supplies, often called "AC adaptors," are connected directly to the plug (which can make them difficult to plug in where space is limited). Both of these designs allow the main device to be smaller or sleeker by moving the power supply outside the unit.
Since the power supply is the first place an electronic device receives electricity, it is also the most vulnerable to power surges and spikes. Therefore, power supplies are designed to handle fluctuations in electrical current and still provide a regulated or consistent power output. Some include fuses that will blow if the surge is too great, protecting the rest of the equipment. After all, it is much cheaper to replace a power supply than an entire computer. Still, it is wise to connect all electronics to a surge protector or UPS to keep them from being damaged by electrical surges.