Close the door and examine the gap between the door and the doorjamb, noting where the gap is wide and where it is narrow. Whether the gap is wider at the top or bottom of the door affects how you adjust the door.
Open the door and remove the screws on all but one of the door’s hinges. If the gap is wider on the bottom of the door, remove all but the top hinge. If the gap is wider at the top of the door, remove all but the bottom hinge.
Use the hinges to cut shims out of cardboard. Place the hinges on a piece of cardboard and cut around the perimeter of the hinges with a utility knife. Cut at least several shims so you do not run out easily while you are adjusting the door’s position.
Place the shims on the doorjamb where the hinges anchor, and then place the hinges over the shims. Drive the hinge’s screws through the shims until the hinges are securely in place again.
Test the door by closing it and examining the gap between the edge of the door and the jamb. If the gap is not the same width all around, remove the hinges and either add more shims or take some away to readjust the door.