Early video games used manually-created animations for characters' death sequences. This had the advantage of low CPU usage, as all that was needed to animate a "dying" character was choose from a set number of pre-drawn animations.
As computers increased in power, it became possible to do limited real-time physical simulations. A ragdoll is therefore a collection of multiple rigid bodies (each of which is ordinarily tied to a bone in the graphics engine's skeletal animation system) tied together by a system of constraints that restrict how the bones may move relative to each other. When the character dies, their body begins to collapse to the ground, honouring these restrictions on each of the joints' motion, which often looks more realistic.
The term ragdoll comes from the problem that the articulated systems, due to the limits of the solvers used, tend to have little or zero joint/skeletal muscle stiffness, leading to a character collapsing much like a toy rag doll, often into comically improbable or compromising positions.
The first game to exhibit ragdoll physics was the Jurassic Park licensed game Jurassic Park: Trespasser, which received very polar opinions; most were negative. The game had a large number of bugs but was remembered for being a pioneer in video-game physics engines.
Modern use of ragdoll physics goes beyond death sequences — there are fighting games where the player controls one part of the body of the fighter and the rest follows along, such as Rag Doll Kung Fu.