Shut the door and examine whether the latch misses the strike plate low or high.
Open the door and place a book underneath the bottom of the door, to prop it open.
Place a piece of cardboard over the bottom hinge leaf on the door jamb, if the latch misses the strike plate low or, place it over the top hinge leaf if the latch misses the strike plate high. Trace an outline of the hinge onto the cardboard using a pencil.
Cut out the hinge outline, using a utility knife or scissors, to create a cardboard shim.
Remove the screws from the jamb side of the bottom hinge, if the latch misses the strike plate low. Remove the screws from the jamb side of the top door hinge if the latch misses high. Use a screwdriver to extract the screws.
Slide a cardboard shim behind the hinge, between the hinge and the door jamb. Reinstall the hinge leaf screws, using the screwdriver. Usually, it's better to install the screws manually with a screwdriver, instead of with a power drill, because you might strip the screws using the drill.