Lets say you have a broken headphone plug, this is a way to repair it, by rebuilding it.
What you will need:
Heat shrink tubing / lighter (optional)
Soldering gun and solder
A broken TRS cable (from headphones, etc.)
Wire snips or toe nail clippers
Step 1: Strip the TRS/Headphone Plug
I don't have a photo of doing this but it's not difficult if your good with a knife. Just keep cutting away until the wires and base that the wires are soldered to are exposed. Then un-solder the wires that are there.
Step 2: Prepare Your Wires
Take the wire you plan to use (i'm using cdrom audio cable). Strip the wires, roll the wires (something I do so they stay tight) and tin the tips with solder.
Step 3: Solder on Wires
Slip on the heat shrink tubing (down the wire so it's out of the way) then solder the wires on. Trim excess and make it neat.
Step 4: Finished
Slip the tubing over the the exposed wiring and apply heat equally. This is it, pretty easy huh? I've made a couple of these rather than buying new ones, I prefer to rip them from dead headphones. Freecycling at it's best.