In wine, yeast is mixed into a source of sugar (grape for wine, barley for beer, etc). It converts the glucose into ethanol, which is used to make the drink alcoholic, and carbon dioxide, which is disposed for wine, but is kept for beer to carbonate it.