I'll break this into a couple parts. How hangovers work, and what to do to prevent them, and also how to cure a hangover if it's already too late.
Something to note is that for every 250 mililiters of alcohol you drink, your body expels (pisses out) 800-1000. Upto 4 times! Make sure you are NOT dehydrated before drinking. I've seen a lot of people recccomend greasy foods. This will NOT cure a hangover, but will PREVENT one if you drink on a full stomach. The food will soak the alcohol, but this will also result in not getting as intoxicated as quickly. If you just drink more to counteract this effect, the hangover will still be there tomorrow.
So you have a hangover? Ouch. Here's some pointers on fixing it. If you can eat, first of all, eat eggs. They have something called cysteine in them, which is what breaks down the hangover causing toxin acetaldehyde in the liver's easily depleted glutathione. Banannas and oranges are also a good way to go as they're both loaded in calcium, which you lose due to the alcohols diuretic (lots of pissing) effect. And of course water, as you could surely imagine, replenishes lost water. Fruit juice is also great, as it contains water, and fructose, which speeds up the body's rate of getting rid of toxins, plus all the vitamins don't hurt. If you need a headache medicine, take Ibuprofen (advil) above Acetaminophen (tylenol) as it is processed through the kidneys and not the already overworked liver.
Some myths about hangovers. Coffee does NOT help. In fact, since caffeine itself is actually a dehydrating drug, coffee can make it worse! The misconception is because caffeine can relieve headaches. Contrary to popular belief, more of the "hair of the dog that bit you" only delays the inevitable. One of the reasons hangovers are so unpleasant is the liver is still processing the toxins left over from alcohol metabolism. Drinking more alcohol can make the symptoms seem to lessen at first but will only make the situation worse once the liver breaks the alcohol down, because it will have even more toxins to deal with.
Last but not least, the "chaser plus" tablets can prevent hangovers. If they contain carbon, they can have the effect of "catching" the toxins before they pass through the body.