Select the proper hinge for the job, both in style and in strength. There are a number of hinge styles available, from basic yet functional to highly decorative yet flimsy. The hinge you select will be determined by its location and function.
Many hinges offer weight ratings which you should be careful to stay within. For example, if you have a 100-pound gate, two 60-pound hinges would work well. Two or three 20-pound hinges would not.
Set the door into its closed position and raise it with shims until it is just high enough to swing clearly. Use a level to make sure the door is even.
Hold the hinges where you plan to attach them, with the rectangular side on the door jamb and the strap on the door. Draw a dot onto the door and door jamb through each screw hole.
Set the hinges aside.
Use a drill with a bit slightly narrower than the screws to bore pilot holes at each dot. These will allow the screws to be inserted without causing the wood to split.
Screw the hinges into the door and jamb, following the pilot holes
Remove the shims and test the swing of the door.