I assume you mean that the door gradually closes, or partially closes on its own. This is usually caused by the door being a little out of level.
What I have done to fix this in the past is to remove one of the hinge pins, lay it on a soft piece of wood, and give it a good rap in the middle with a hammer. This bends the hinge pin slightly. I then tap the pin back into place. The added friction of the slightly bent pin is enough to keep the door from moving on its own. I am talking of interior doors.
I have one door in my own house that I did this to about 5 years ago, and it is still good. It really works!