Good answer from yoavdothan
Two main reasons - one of them chemical on the brain - upsets the balance mechanism and causes vomiting for the same reason that sea-sickness or travel sickness causes vomiting
Second reason is due to inflammation of the stomach lining (called gastritis) - alcohol is toxic to the lining of the stomach and regular heavy drinkers often get stomach pains and vomiting due to this damage