How to create child-of constraint
Select your object. Go to the the contsraints section of the properties window and add Child of constraint.Then select what object you want to use as target.



more info here: https://www.blender.org/manual/rigging/constraints/relationship/child_of.html?highlight=child