When you are creating constraints between two rigid bodies, at least one of them must be active (see Active or Passive? for more information).
In this example, you will constrain object B to object A:
Object A is the constraining object and should be passive if you don't want forces or collisions to affect it; however, object A can be animated. As well, it's recommended that the constraining object is larger or has more mass. This makes it a more stable anchor for objects that are constrained to it.
Object B is the object that will be constrained and needs to be an active rigid body.
To constrain two rigid bodies together
Choose a constraint from the Create Rigid Body Rigid Constraint menu in the Simulate toolbar: Hinge, Ball and Socket, Spring, Slider, or Fixed.
The constraint object is created at the origin. Left-click the spot where you want it to be positioned — the constraint object goes there.
Left or middle-click to pick object A (the passive object). The constraint object is attached to this object's center.
Left or middle-click to pick object B (the active object). The constraint object is then attached to this object's center.
Ball and socket constraint created between two rigid bodies. Object A is passive and object B is active.
On the right, object B's resulting movement with gravity applied. Notice how the constraint object is attached to both constrained objects' centers.
The following illustrations show the other constraint control objects. The position and orientation of the control objects determine how the constrained object moves.