Open the door halfway. Use a hammer and a flat-head screwdriver or a small chisel to pop the hinge pins out from each of the three hinges. Pull the door toward you, away from the door frame so that the hinges separate.
Use a drill or screwdriver to remove each of the three mounting screws that hold each hinge piece to the door jamb. Each hinge should have three screws that attach it to the door jamb. Do this for each of the three hinges.
Attach each of the hinges back to the door jamb with three 2-inch long deck screws. These screws are long enough that they will penetrate the door jamb, and bore into the framing stud behind it, which will help hold them in place.
Tighten each of the three screws that hold each hinge to the door. These screws are not typically the ones that will loosen and cause the door to sag, but tighten them since you have the door unhinged.
Hang the door back into place so that the hinges align. Insert each hinge pin back into the center of each of the three hinges. Tap each pin down with your hammer until the head is flush with the top of the hinge. Shut the door and open it to make sure the door is not sagging. The deck screws should hold the door at the proper level.