When you vomit your body is trying to get rid of something harmful. your body expels the harmful substance through your esophagus and out of your mouth. Things that cause it can be different: bacteria, toxins, salmonella, etc.