Cavities form when bacteria in your mouth feed on sugars and starches, producing acids that dissolve tooth enamel over time. This isn’t a sudden event. It’s a slow, repeating cycle of acid attacks that gradually eats through the layers of a tooth, sometimes over months or years before you notice anything wrong.
What’s Actually Happening on Your Teeth
Your mouth is home to hundreds of species of bacteria, and they’re constantly organizing themselves into a sticky film on your teeth called plaque. This biofilm starts forming almost immediately after you brush. First, proteins from your saliva coat the tooth surface in a thin layer called the pellicle. Then bacteria begin attaching, both individually and in clumps, building a three-dimensional community that grows more complex over time. If left undisturbed, this biofilm thickens and matures into what you can feel as a fuzzy coating on your teeth.
The bacterium most responsible for cavities is Streptococcus mutans. When you eat or drink something containing sugar or starch, S. mutans breaks those carbohydrates down through fermentation and releases organic acids, primarily lactic acid, as a byproduct. This acid is what actually damages your teeth. But here’s the part most people don’t realize: these bacteria can also store excess sugar inside their cells as a starch-like reserve. When the sugar from your meal is gone, S. mutans breaks down those internal stores and keeps producing acid. That means the acid attack continues even after you’ve stopped eating.
The pH Threshold That Matters
Tooth enamel is the hardest tissue in your body, made up of about 96% hydroxyapatite, a crystalline mineral. Despite its hardness, it has a chemical vulnerability: it starts dissolving when the environment around it drops below a pH of roughly 5.5. This is called the critical pH. Above that number, your saliva can actually repair minor mineral loss by depositing calcium and phosphate back into the enamel. Below it, minerals leach out faster than they’re replaced.
Every time you eat something sugary or starchy, bacteria drive the pH in your mouth below that threshold. The more acidic the environment and the longer it stays acidic, the more mineral your enamel loses. Research shows that mineral loss increases in a linear fashion as pH drops from 5.2 down to 4.0, with complete mineral destruction occurring at the most acidic levels over a matter of weeks. In everyday terms, this means frequent snacking or sipping sugary drinks keeps your mouth in the danger zone for longer stretches, giving your saliva less time to neutralize the acid and repair the damage.
How a Cavity Develops Stage by Stage
Cavities don’t appear overnight. They progress through distinct stages, and catching them early makes a significant difference.
The first sign is a white spot on the tooth surface. This chalky, opaque area means minerals are leaching out of the enamel but the surface hasn’t actually broken yet. At this stage, the process is still reversible. Fluoride, good oral hygiene, and reducing sugar intake can help the enamel remineralize and recover.
If the acid attacks continue, the enamel weakens further. The white spot may darken to a brown color, and eventually the surface breaks down, forming a small hole. This is the cavity itself. Once enamel is physically broken, it can’t grow back on its own.
Below the enamel sits dentin, a softer tissue that makes up the bulk of the tooth. Decay moves faster through dentin because it’s less mineralized and more porous. You may start feeling sensitivity to hot, cold, or sweet foods at this stage. If decay keeps advancing, it reaches the pulp, the innermost part of the tooth containing nerves and blood vessels. That’s when real pain typically starts, often throbbing or constant. Left untreated, the infection can spread beyond the tooth root and form an abscess, a pocket of pus in the surrounding bone or tissue that can cause swelling, fever, and serious complications.
Why Some People Get More Cavities
Diet is the most obvious factor. The more frequently you expose your teeth to sugar and refined carbohydrates, the more fuel you’re giving acid-producing bacteria. It’s not just the total amount of sugar that matters but how often you consume it. Three sodas spread across the day create far more acid exposure than one soda with a meal, because each exposure restarts the acid cycle.
Saliva plays a surprisingly large role. It washes away food particles, neutralizes acids, and delivers minerals back to damaged enamel. People with reduced saliva flow, a condition called dry mouth, lose that protective buffer. Normal unstimulated saliva flows at a certain baseline rate, and when it drops to 0.1 milliliters per minute or less, the risk of cavities, tooth sensitivity, and oral infections climbs substantially. Dry mouth can result from hundreds of common medications (antihistamines, antidepressants, blood pressure drugs), medical treatments like radiation therapy to the head and neck, and certain autoimmune conditions.
The bacterial makeup of your mouth also varies from person to person. Some people naturally harbor higher populations of acid-producing bacteria, which partly explains why two people with similar diets and brushing habits can have very different cavity histories. The composition of your oral microbiome is shaped early in life, often through transmission from caregivers, and tends to persist.
Other factors include the shape and spacing of your teeth (deep grooves and tight contacts trap food more easily), whether your drinking water contains fluoride, and how effectively you remove plaque through brushing and flossing. Genetics influence enamel thickness and saliva composition, giving some people a natural advantage or disadvantage.
How Saliva Fights Back
Your mouth has a built-in defense system. After an acid attack, saliva gradually raises the pH back above 5.5, typically within 20 to 40 minutes if no new sugar is introduced. During this recovery window, calcium and phosphate ions in saliva redeposit into weakened enamel in a process called remineralization. Fluoride accelerates this process and makes the repaired enamel slightly more acid-resistant than the original.
This is why the pattern of eating matters so much. Three meals a day with water in between gives your saliva enough recovery time. Constant grazing or sipping sweetened beverages keeps the pH suppressed and tips the balance toward permanent mineral loss. Chewing sugar-free gum after meals can stimulate saliva flow and speed up the neutralization process.
What Actually Prevents Cavities
Since cavities are fundamentally a chemical process driven by acid, prevention targets every link in the chain. Brushing twice a day with fluoride toothpaste removes the bacterial biofilm before it matures and delivers fluoride directly to enamel. Flossing clears plaque from between teeth where brushes can’t reach and where cavities commonly form undetected.
Limiting sugar frequency, not just sugar quantity, reduces the number of acid cycles your teeth endure each day. Drinking water after meals or snacks helps dilute acids and rinse away food debris. For people with dry mouth, saliva substitutes, frequent sips of water, and sugar-free lozenges can partially compensate for the lost protection.
Fluoride deserves special mention because it works on multiple fronts. It integrates into the enamel crystal structure, making it harder to dissolve. It promotes remineralization of early damage. And at higher concentrations found in professional treatments, it can inhibit bacterial acid production. This is why communities with fluoridated water consistently see lower cavity rates, and why fluoride toothpaste remains the single most effective daily preventive measure.

