Condensed from the proper "ratchet and pawl", a ratchet mechanism is one in which relative rotary motion is restricted or prevented in one or both directions by a member with one or more teeth (the "pawl") which presses against a toothed wheel (the "ratchet").
Use in Transformers
In Transformers toys, the pawl is generally spring-loaded, keeping the ratchet from turning freely when a small force is applied in either direction of rotation. When this force is increased past a certain threshold, the pawl is forced back, allowing the ratchet to rotate with audible clicks as the pawl strikes one tooth after another. Because of the mechanical locking of the ratchet and pawl, a ratchet joint of a given size can support a larger load than an equivalent joint restricted only by friction.
Ratchets are often used in joints which must support a fairly high load (high in the plastic toy world, that is) while taking multiple stable configurations. Energon Barricade's hip joints, for example, use ratchets.
A ratchet joint's rotary members only allow it to bend along a single axis; it must be combined with other joints to allow the same range of motion as the simpler but friction-dependent ball joint. This, along with the greater number of parts involved, makes a ratchet much more expensive to make and assemble than a ball joint.