How do I determine the model of my Shimano Rear Derailleur?
Practically there are only a few things that you need to match a rear derailleur to the one it's replacing. 

The first is the mounting point - check the mounting to the frame is the same. 

The other is the length of the cage - a short cage is typically used for road bikes and medium or long cage for mountain. The longer the cage, the bigger range of gears it can cope with, but the less precise the shifting is. As a rule try to stick to the same length cage, but if not, go longer rather than shorter (Unless you know what you are doing). try to stay with one for the number of gears as the chain, but it is not critical if its one either side. (i.e. an 8-speed on a 7-speed chain should be fine)

So if they're all pretty much compatible - you are probably wondering why such a large range - it's all down to weight, quality of shifting, expected life and price and just plain old marketing... 

My advice - head down to the LBS (local bike shop) with your bike (or just the derailleur), and have a chat with them. They will have something off the shelf that will work, and you can discuss cost/quality etc. The LBS should be able to fit a new one in 1/2 hour if you want them to do it. I have had great success purchasing stuff or bikes online, however have also had the odd incompatibility due to not being aware of some seemingly minor detail. 

If the end of the old cable is frayed/cut and not soldered, buy a new one.  it's just not worth the effort mucking around with the original cable, and they are only a few dollars.