Certain types of bacteria live in our mouths. When these bacteria come into contact with sugary foods and drinks, acids are produced. These acids attack the enamel on the exterior of the teeth, eventually eating through the enamel and creating holes in the teeth, which we call cavities.