PC power supplies do fail occasionally. While you may never own the same PC long enough to have a failure, it isn't unusual for a PC aged one to three years to need a replacement. Power supply failures don't necessarily have to be total. Sometimes the power supply will appear to function but the PC experiences difficulty starting or random, sudden crashes. These are some symptoms that can result from a failing power supply.
Before opening the case, turn off and unplug the PC to avoid an electrical shock hazard. Exercise caution as there are sharp edges inside the PC and its components. Always wear a static electricity discharge strap and attach the lead to the metal frame of the case, when working with your PC's components to avoid damaging your PC. Note that some manufacturers will void your PC's warranty if you open the case.
The power supply is easily replaced. The key considerations for choosing a replacement are that the old one is removable (it almost always is), that it has the appropriate power connectors for your motherboard and that it supplies enough power for your PC's needs. See the overview for more information on selecting a power supply.