Before opening the case, unplug the PC to avoid an electrical shock hazard. Exercise caution as there are sharp edges on a 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 only 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.
Unplug the PC
Disconnect all wires from the back of the PC
Remove the case
Unplug the power supply from the motherboard and each of the devices
Disconnect the ware from the on/off switch (or remove the entire switch)
Remove the power supply's retaining screws
Remove the power supply
Install the new power supply
Connect the switch
Plug in the motherboard
Plug in each of the devices
Replace the cover
Plug in the PC
That's it! No other configuration or changes are necessary.