During my last ride, my front derailer cable gave up on me and froze. I use this all the time on rides so I was thankful that it waited until we neared the end of our third day of riding. Here are the steps to change a cable on a bicycle. Each bike manufacture is going to be a little different, but these should provide you some guidance in general. Worst case you have to take your bike to a bike shop and pay for the repair, so go for it!
Step 1: Replacement Cable
Locate the correct cable for your bike. Stores like Wal-Mart and KMart often times have universal cable kits which ended up working great for my particular bicycle.
Step 2: Cable Path
Before removing the old cable, take note of the path of the old cable. After a cable is out it might be difficult to determine the correct path when threading the new cable.
Step 3: Remove Old
Ok, now that we have a clear picture of the path of the old cable, it is time to remove the old cable. If the cable runs through any of the bike's tubing, you may want to consider connecting a string to one end so you can pull the new cable through a difficult area. This was not necessary on my bicycle, but could be an issue on yours.
Step 4: Compare
Once the old cable is off, lay the old cable and new cable side-by-side to compare for differences. If it is not the precise cable you may need to cut the cable to length*. I recommend cutting the cable a bit longer than the old one just in case. "Measure twice, cut once" is a good motto. If you end up cutting the cable, fit the cut end of the new cable with metal end that comes with kit. This is what the cable pushes against and without it your new cable will fail prematurely.