This means adjusting the position of the hinges...you need to use a spirit level to see if your door frame is absolutely vertical first, followed by the same test on the door. My guess is that the door is hanging ever so slightly downwards, and this means removing the bottom hinge, plugging the screwholes with matchsticks and moving the hinge outwards a little...this will stop your door swinging shut but its quite an involved procedure needing a reasonable tool kit - its easy to damage the door frame if you haven't done this before.
John, February 2008