Firstly, make sure the 'cars' are separate objects, and make sure the wheel's Object Origin is at the centre of the wheel.
Here, you can see I have a circle, with monkeys (as separate, selectable objects) arranged around the outside:
The Object Origin (the orange dot in the centre) of the wheel means the wheel will rotate around the centre. The Object Origin of the monkeys ('cars') are at their top so they will rotate around this point as if they are 'hanging'.
Now, you want to select all the 'cars' then select the wheel last and press Ctrl+P to parent the cars to the wheel. Rotating the wheel will make all the cars rotate with it, but obviously they will not 'hang' like a real 'car' would.
For this we can add a Constraint to lock the rotation of the 'cars'. Select one of the cars and in the Constraints tab of the Properties editor add a Limit Rotation constraint :
By looking at the axis of the 'car' I can see it is the red x axis that I want to lock the rotation of:
On the constraint you just added tick the Limit X checkbox and also For Transform. By leaving the Min and Max values for the x axis on the constraint at '0' I am making sure the 'cars' can rotate 0 degrees.
Select all the cars and then select the car that you just added a constraint to and go to Object> Constraints> Copy Constraints to Selected Objects in the 3D View header:
This copies the constraint to all the 'cars'. Now if you rotate the wheel the 'cars' will follow but their rotation will be locked:
Now you are free to animate the rotation of the wheel and let the constraints manage the 'cars'.