Another option is to adjust a hinge by shiming or deepening the mortise. If the top of the door rubs, then you may be able to shim the top hinge or deepen the mortise of the bottom hinge. If the latch edge of the door binds at the bottom, you would do the same steps. For a door that binds at the upper latch edge or the bottom rubs the floor, then the opposite hinges would be adjusted.
If the door still sticks, it is probably as a result of humidity causing the door and frame to swell. To fix a wooden door you will need to sand or plane the edge of the door to allow it to fit in the opening. It is important to remove only a little material at a time. If you take off too much material, it may result in excessive gaps, especially when the humidity drops and the door shrinks. For a door made of metal or fiberglass, adjustments must be made to the door jamb instead of the door itself.
Find where the door is touching the door jamb and lightly draw some pencil marks on the area to be removed. You may be able to work on the door while it is hanging or you might have to remove it first. In either case, support the door so it will not move while you are working on it. Use a sanding block, sander, block plane or power planer to remove those pencil marks. Now try the door again. If it sticks, repeat the steps beginning with the pencil marks. Be careful not to remove too much material. The door may have only a small amount of exposed wood, underneath the door may be hollow or have some other filler material.
If it doesn't stick, then seal the wood with some primer and then repaint when the primer has dried. While you are at it, check that all edges of the door are properly sealed. A properly sealed door is less likely to swell during periods of high humidity.