Repairing power supply in a desktop computer

I would like to know if you can help me with repairing the power supply of my desktop. I want to know step by step procedure on how to install/repair it, so that I can just do it by myself.
Could you also help me understand what a power supply is and what is the importance of this equipment in my desktop. I can see different connectors in a power supply and I want to know where I need to connect them, so that I can use the CPU without me asking any help from an IT.
