What causes cavities?

Certain types of bacteria naturally live in our mouths. When these bacteria come into contact with sugary foods left behind on our teeth, they produce acids. These acids attack the tooth enamel (outer, protective layer) and eventually eat through the enamel, creating holes in the teeth, which we call cavities.