If a door isn't closing properly, and the problem seems to be with the hinge side rather than the latch, you can probably fix it with some minor adjustments at the hinges. Sometimes doors weren't originally hung properly, or have shifted over time, and now are binding when you try to close them, or sagging at the jamb (the part of the door frame that the hinges are screwed into). Depending on the situation, you might have to shim the hinges up, or sink them lower by chiseling. You might have to reposition the hinge further back on the jamb so the hinge pins can turn. Or you might just need to sink some longer screws into the existing holes to better secure the door.
Stand on the hinge side of the door.
Slowly open and close the door to assess what it's doing.
Assess the condition and positions of the hinges, whether they're sitting even with the level of the wood on the jamb, and whether the screws are tight.
Shim up the hinge plates by loosening the screws that hold the plate to the jamb, sliding two wood shims under the hinge between the screws until the plate is the same level as the wood.
Screw the plate back down.
Do the same for both hinges, if necessary.
Unscrew the hinge plates from the jamb completely and remove the door.
With your chisel and hammer, chisel off a layer of wood within the indented area where the hinge was sitting. Take off enough so that the hinge plate will sit squarely in the indented area and be level with the surrounding wood. (Keep the door standing nearby so you can look at the hinges and judge how much to chisel.)
Hang the door back up and test it.
Unscrew the hinges from the jamb and remove the door.
Tap wood plugs into existing screw holes with your hammer, and cut them off at the level of the wood with your razor knife.
Set the door back into place with the hinge screw holes sitting closer to the hinge side of the door.
Drill pilot holes for new the new position next to the previous holes, and screw the hinge plates back on.
Remove one screw from the hinge.
Replace the removed screw with a new 3-inch wood screw, sinking it all the way into the jamb with your drill and screwdriver bit.
Repeat for each of the other screws that are loose and spinning.