The standard trick is to pull out one hinge pin and mash it with a hammer just enough to make it bind in the hinge so the door won't move without pushing it. If that helps, but is not enough, do the same thing to the other hinge pin.
The problem is that the door jamb is not plumb. The correct way to fix that is to remove the jamb and reset it, but that is a lot of work!