How can you prevent hangovers?

Don't drink. If you don't drink alcohol you will not have a hangover, of course if you drink sensibly you won't have a hangover either.
Moderation. You can start by not drinking more than 5 alcoholic drinks (of normal size) a night. No more than 3 in a 2 hour period. You also want to make sure you have had at least 5 cups of water & a full meal before you drink alcohol. Another thing that may help is to alternate your alcohol with water (beer, water, beer, water; for example). Stick to light alcohols, and to the same type (don't switch).