Heat shrink tubing is a thin plastic tube used by electricians and engineers to insulate wires and bundle wires together. If you can't tell by the name, heat shrink slides around a cord and contracts with the application of heat, giving a snug fit to whatever it's wrapped around. You can use it to reinforce your everyday cords and prevent small cuts and exposed wires from getting worse, giving your headphones or other cords new life.
Where to Get It:
You can find heat shrink at an electronics store (like Radio Shack), or online at a retailer like Amazon. Heat shrink tubing comes in a bevy of colors and diameters, so you'll want to make sure you're picking the right shade (if you're trying to match your cord) and size (the tube will only shrink so much, so you want a reasonably snug fit that will still make it over your cord's plug or jack). If you're stocking your toolkit for a rainy day, an assorted pack like this one will tackle all of your everyday repairs for less than $20.
How to Use It:
This video tutorial on YouTube does a good job of showing how easy it is to apply heat shrink to a pair of headphones with just a lighter. Here, they're applying the heat shrink to a new pair of headphones (an ounce of prevention equals a pound of cure, and all that):
You can see that this technique works well to repair headphones that split at the jack, thanks to the fact that the plug end of headphones is usually pretty slim and can slide through the heat shrink. If you need to patch up a wire with bulky ends, check out this tutorial from Jasper Blacketer where he cuts and reattaches the earbud ends of his headphones.