Having a sweet tooth may also mean a mouthful of decayed teeth. A new video published by PBS NOVA’s Gross Science channel on YouTube reveals the ugly truth behind how cavities are formed, how the swarms of bacteria in your mouth work to keep your mouth healthy, and what happens when they fail.

More than 100,000 bacteria live on each tooth to help maintain balance, but the candy-loving bacteria can also turn on your teeth and lead to devastating decay. According to the Mayo Clinic, when certain sugar-containing foods and drinks enter your mouth, they attach to your teeth. If they aren’t cleaned off, bacteria eat off of the sugars and form bacterial plaque that eventually coats the surface of your teeth. If plaque isn’t removed while it’s still soft, it hardens and becomes a biofilm that contains a community of microbial bacteria. It’s also the ideal place for bacteria to find refuge and hide from your toothbrush. Biofilms feed off of sugar and release an acidic waste product.

The acids in the plaque pull out minerals and remove the tooth’s hard, outer enamel, leading to erosion — the first stages of a cavity. If left untreated, the bacteria will begin to communicate with one another by sending out molecular signals, which leads them to work together, grow, and ultimately throw off the bacterial balance within the mouth. The more candy or soda you drink, the more acid the bacteria produce. The enamel becomes less resistant to acid, and decay travels to the inner tooth material, where nerves and blood vessels are present. The decay advances and eventually leads to sensitivity, toothache, and a warm seat at the dentist.