Certain types of bacteria live in our mouths. When these bacteria come into contact with sugary foods left behind on our teeth after eating, 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.