It's meant to see how your body processes the sugar, and therefore can detect gestational diabetes. If your numbers are too high, they will have you schedule a 2nd test in which you drink a stronger version of the sugary drink, take blood, and then once every hour for 3 hours they take blood again. Many women fail the first test, take the 2nd test and pass it.
They have you drink this flavored, sugary drink and then an hour later they take a few vials of blood. It's really simple.