Simply drinking a large glass of water before going out, and having a glass of water after each alcoholic drink, is a pretty good way to avoid a hangover.
(also the water will help you pee out a lot of toxic crud that your kidneys have kindly removed from your bloodstream for you).
A big part of the hangover is waiting for your body to get rid of acetaldehyde. Drinking more reduces your awareness of the effects of acetaldehyde, but increases the total amount of it in your body, prolonging the hangover.
Whether you get hangovers or not largely depends on the relative efficiency of your ADH versus your ALDH enzymes. If you clear aldehyde faster than you can metabolize the alcohol, you never get hangovers unless you have some odd sulfur-based chemistry happening in your body. If you clear aldehyde slower than you metabolize alcohol, you get hangover effects. If you have an ALDH defect, or are taking a drug that antagonizes it, you might experience "Asian blush", with immediate unpleasant reactions to drinking alcohol.
Dehydration has its own unpleasant symptoms, and since alcohol is a diuretic, it can dehydrate you. Drinking water or electrolyte rehydration solutions will help with that. You can be fully hydrated and still have a hangover, but at least you won't have a hangover and be dehydrated too.
I have never had a hangover, but the chemistry suggests that if you get them routinely, supplementing your diet with NAC might help. Eating tofu and shiitake (high in tryptophan/niacin) with MSG as you drink or after you drink might also help. It's mostly your genetics, though. If you get bad hangovers, there's no easy cure for it other than to drink less alcohol.
At the start of my bachelor party (and possibly later on that night? It gets blurry) we brought workout hydration powder, the kind you use during and after a gym session. Drank a lot of it ideally to prevent or reduce hangovers.
I have no idea how much it helped, because I was still hungover the next day.