Glass doors tend to come in two main varieties; those that move on rollers and a track and those that swing in and out on hinges. You'll commonly find hinged glass doors in bathroom showers, with the hinges drilled directly into the glass or held in place with pressure alone. A door hinge that has come loose may cause the door to drag at the bottom, causing damage to the door. While adjusting, you will likely need a partner's help to prevent the glass door from falling to the ground as you loosen the door.
Have a partner hold the door while loosening the screws on the bottom hinge using a screwdriver.
Loosen the hinges from the bottom to the top. Have your partner adjust the door until it looks straight.
Hold a carpenter's level at the top of the door and adjust the door until it is level. Hold the door in place.
Tighten the hinges again. Start with the bottom hinge first, the top hinge second and then the middle hinge last. This prevents the door from shifting. Tighten the screws until they are slightly tight. Do not force the screws or you may crack the door.