When you breathe, your mouth takes in air.
When you eat or drink, your mouth takes in solids and liquids.
The epiglottis helps keep your air going into your lungs, and keeps the food and drink out of your lungs.
The epiglottis is a small piece of skin below your pharynx that usually stays pointed up and out of the way so you can breathe.
When you swallow, a bone in your throat called the hyoid bone pulls it down flat and blocks your trachea, so the food doesn't go into your lungs.
(from: wikipedia - epiglottis)
Kid Facts - Blast from the past: Mandible