step by step description on how to connect two objects with a hinge constraint
As it is written in the Blender reference manual's page about Rigid Body Joint Constraint this kind of constraint..


  ... it is used by the physical part of the Blender Game Engine to simulate a joint between its owner and its target.


So the first step is to make sure you are using the Blender Game engine. You can always save the result of the animation by recording it in order to use outside the BGE.



Now, focusing on a simple scene composed by two cubes like the following:



assign to the cube that will not move a Rigid Body Joint constraint and choose Hinge as pivot type. At this point you have to consider the cube (mainly it's origin) as the "pivot", while the target field must be filled with the name of the object that will be affected by the constraint: in this case the blue cube, named "Cube_Moving".

You should think about the object that brings the constrint as the pivot controller, by default it is placed in its origin, but you can tweak the relative position of the hinge with the options in the right panel.

Going on, you'll have to remember that...


  ...the owner and target can only rotate around the X axis of the pivot (joint point).


So it'll be better to move the blue cube away from the X axis, or we'll not see the result of the constraint.



At this point we have to set up some physic for testing the constraint. As it is said by a note in the manual:


  In order for this constraint to work properly, both objects (so the owner and the target object) need to have Collision Bounds enabled.


Go to the physic tab, as shown in the pic above and enable the option for the grey cube, and then for the blue. We-ll also change the Physic Type from Static to Rigid Body for this object (we could also have can set it for both, it's just an example):



To sum up:


Blender Game
Assign constraint to the pivot controller and make it pointing to the Target
Collision Bounds enabled


Final result: