Hangovers are usually caused by lack of water and by combining alcohol with sugar.
Margaritas, Cosmos, Mojitos, and other drinks mixed with sugar are killers.
Wine has sugar in it so that can be a problem. Juice is almost liquid sugar so anything with OJ, pineapple juice, etc, is a killer. Cognac, rum, and other alcohols are also naturally sweet. Champagne is especially lethal because the bubbles intensify the effect.
Eating something sweet while drinking presents the same problem. You are just mixing sweet drinks in your tummy instead of in the glass.
All alcohol is dehydrating. So while your body wants water, you are making it want even more. That is why the alcohol hits so hard.
Alcohol is also a vaso-constrictor. That means it shrinks your blood veins or arteries (not sure which - might be both). Thus blood flow is inhibited. That is the reason for the headaches - your head is not getting enough blood.
Aspirin opens the blood flow. That is why it is the best ammunition to use on a headache.
Some of the gals who talked about drinking a small amount of wine and getting horiffic headaches may be allergic to something in the wine, like histamines or sulfer.
How to avoid a hangover:
Don't drink. (Durrrrr)
Don't drink anything sweet. If you like sweet drinks, just have one.
Don't drink while eating sweets.
If you do drink, consume a minimum of 8oz (1/4 litre) of water per shot or ounce of booze. Also drink a huge glass of water just before bed.
Take 2 aspirin just before bed.
Some gals like to have one glass of wine to make them less nervous when first arriving to a social event. If this is you, drink a white wine spritzer instead. (Half white wine, half fizzy water.) The bubbles will make you high faster but you are drinking water and consuming far less alcohol and will have less chance of a headache.
These tricks work.
I learned them from a past boss. I was the Operations Officer and I always hired college students to do the clerical work. So we had someone turning 21 several times a year. My boss would give a speech containing the above to help them survive the ritual bar hopping party with friends on their birthday.
Boss said he learned it while at MIT.
I doubt he learned it in the classroom.