There quite a few tutorials out there for Box2D like this one here that you can take a look at.
The main concept behind a ragdoll in game is to create a series of boxes and circles that make up a form and joint them together. Splitting up your character into parts and then jointing those parts together is pretty much it. The physics system will take care of the rest. Sometimes you have to group parts together and such.
I believe Box2D has a tutorial swf with code (last I checked) that has code for ragdolls. Take a look at those to get an idea of how someone else does it.