According to the article, a hangover from a heavy night (and/or day) of drinking is mainly due to dehydration.
The dehydration process begins with a chemical reaction in the brain; specifically the pituitary gland. This reaction causes less vasopressin to be released from the pituitary gland, which in turn causes the kidneys to send water directly into the bladder (rather than reabsorbing it).
So why do hangovers cause headaches? Apparently the massive amount of dehydration by the morning causes the body's organs to steal water from the brain.
According to the article, this causes "the brain to decrease in size and pull on the membranes that connect the brain to the skull, resulting in pain". This cannot be good for neuronal health!
Based on this information it seems that the best way to avoid a hangover is to drink plenty of water along with those heavy booze. There are other things (e.g. electrolytes) that are lost along with H2O, however.
I'm not convinced that these really work, but some hangover prevention pills on the market may help to avoid losing these essential chemicals.
Each type of drink has a different kind of hangover associated with it, according to this article. Red wine and dark liquors have the worst side effects, while vodka is the least likely to cause a hangover.
If these articles are right, a good way to drink without getting a hangover is to take shots of water between shots of vodka (no one could tell the difference!), and maybe add a little orange juice (making a screwdriver) to add some electrolytes back into the mix. Anyone care to test out this theory…?