What tool is needed to remove a Shimano HG-50 freewheel from the wheel hub? It looks like a 12mm or 13mm Allen key. Will this do it or is there some detail I have missed?
You will need a sprocket chain whip for holding it and a tool for opening the sprocket lock ring...it's very easy job with the proper tool...
This is an HG 50 Cassette.
This is an exploded view of a Shimano freehub showing the 10mm or 12mm allen key used to remove the freehub from the hub shell. I believe this is the allen you are referencing, but it need not be removed to remove the gear cluster.
Instructions for removing either a cassette or a freewheel can be found here.
If it is truly a freewheel. then this is the appropriate tool, the Park FR-1:
If you need a cassette remover, then this is the appropriate tool, the Park FR-5:
along with this one, or a similar chain whip:
I hope that is helpful.
The HG-50 is a cassette, not a freewheel. The freewheel is a part of the hub, and normally you never have to remove it. (On old bikes, the cassette and the freewheel came as one unit, and screwed onto the hub body. Nobody makes them like that anymore.)
Read the Park Tools link that Daniel gave you. Go about halfway down to "Cassette Cog Lockring Removal and Installation" - it should tell you everything. You'll need a lockring tool to unscrew the lockring, a wrench to hold the lockring tool, and a chainwhip to hold the cogs and keep them from spinning as you're loosening the lockring.