With the door open only a few inches, grab it at the back from underneath and lift up. If it lifts up a couple of inches, the hinge pins are worn. You might be able to find repair pins at the auto parts stores.
If there is no movement or it isn't real bad, put something under the rear of the door, covered with a piece of carpet, to put upward pressure on it, then loosen the hinge bolts on the body to slide the hinge. Start by moving the top hinge forward. Once the bolts are tightened, close the door slowly to check the latch position. It should not drag on the striker. Next, look at the gap at the rear of the door. If it is excessive, do the same procedure but move the lower hinge rearward. Usually it's the upper hinge that is worn. If the lower one is the problem, the front of the door is likely to catch on the rear of the fender and bend it.
On some cheaper cars, to save money, the hinges were welded at the factory and are not adjustable. Often you can pull up hard at the rear of the door and bend the front where the hinges are mounted. If new hinge pins don't help, body shops have tools for adjusting those doors.