The easiest fix is to remove your middle hinge pin and put a slight bend in it.
How to fix a door hinge that keeps closing.
If your door has only two hinges close.
Tap the screwdriver with the hammer until the pin pops up from the hinge and can be removed by hand.
The door should no longer move itself.
Take a hammer and long nail and tap the pin gently from the highest hinge.
By bending the hinge you have increased the internal resistance within the hinge so it keeps the door from moving as easily as before.
Work your way from the top of the door to the bottom.
Remove the pin by placing a screwdriver under the middle hinge.
If one is loose remove two or more screws and try driving in longer screws.
If a door binds open it grasp the knob and lift up to see if a hinge is loose.
Tap it with a hammer forcing the nail out the top of the hinge.
If not align the hinge knuckles and tap the pins.
Open the door and check that the hinge pins are seated all the way within the hinge.
How to fix a door that swings shut.
If you have a really crooked frame and still need just a little more resistance remove another hinge pin and perform the same magic.
Check to see if the hinges are aligned correctly before you take the hardware off the door completely.
When i say slight that means a barely noticeable bend.
Place a large nail or small screwdriver on the bottom of the center hinge pin of your door.