Cavities form when bacteria in your mouth feed on sugars and starches, produce acid as a waste product, and that acid slowly dissolves the hard mineral surface of your teeth. It’s not a sudden event. It’s a gradual process that can take months or even years, which means there are multiple points where you can slow it down or stop it entirely. Untreated tooth decay in permanent teeth is the single most common health condition worldwide, so understanding how it actually happens puts you ahead of most people.
What’s Really Happening Inside Your Mouth
Your mouth is home to hundreds of species of bacteria, but one in particular drives most cavities: a microbe called Streptococcus mutans. This bacterium lives in the sticky film that builds up on your teeth throughout the day, commonly called plaque. When you eat or drink something containing sugar or starch, S. mutans absorbs those carbohydrates and ferments them through the same basic process yeast uses to make alcohol. The primary waste product is lactic acid.
That acid is the real problem. Your tooth enamel, the white outer shell, is the hardest tissue in your body, but it’s made almost entirely of minerals. When the acid drops the pH at the tooth surface below about 5.5, those minerals start dissolving. This process is called demineralization. A single sugary snack creates an acid attack that can last 20 to 30 minutes. If these attacks happen frequently enough, your teeth lose minerals faster than they can recover, and decay begins.
Sugar plays a second, less obvious role. S. mutans uses sucrose (table sugar) to manufacture a glue-like substance that helps the plaque stick more firmly to your teeth. So sugar doesn’t just feed the bacteria. It literally helps them build a stronger fortress on your enamel.
How Your Body Fights Back
Your saliva is a surprisingly powerful defense system. It rinses away food particles, neutralizes acids by buffering the pH back toward normal, and supplies calcium and phosphate ions that redeposit into weakened spots on your enamel. This repair process, called remineralization, happens naturally between meals and while you sleep. Fluoride supercharges this process by making the repaired enamel more acid-resistant than the original. Community water fluoridation alone reduces cavities by about 25% in both children and adults, according to CDC data.
The balance between demineralization and remineralization determines whether you get a cavity. If acid attacks are frequent, prolonged, or your saliva can’t keep up, demineralization wins and decay progresses. Anything that tips this balance in the wrong direction increases your risk.
The Five Stages of Tooth Decay
Cavities don’t appear overnight. They move through distinct stages, and the earlier you catch them, the easier they are to manage.
Stage 1: White spots. The earliest sign is a chalky white spot on the tooth surface where minerals have started leaching out. At this point, no actual hole exists. With good oral hygiene and fluoride exposure, this stage can actually reverse itself completely.
Stage 2: Enamel breakdown. If demineralization continues, the white spot may darken to brown and the enamel surface begins to crack and form a small hole. This is the point most people think of as “getting a cavity.” Once enamel has physically broken through, it can’t regenerate on its own.
Stage 3: Deeper decay into dentin. Beneath your enamel sits a softer layer called dentin. Because dentin is less mineralized, decay accelerates once it reaches this layer. Dentin also contains tiny tubes that connect to the tooth’s nerve, so this is typically when you start noticing sensitivity to hot, cold, or sweet foods.
Stage 4: Pulp involvement. The innermost part of your tooth contains living tissue with nerves and blood vessels. When decay reaches this layer, the tissue becomes inflamed and swells. Because it’s trapped inside a rigid tooth, the swelling presses on nerves and causes significant, often throbbing pain.
Stage 5: Abscess. If bacteria reach the pulp and cause infection, a pocket of pus can form at the root tip. An abscess can cause severe pain, facial swelling, and fever, and it requires prompt treatment to prevent the infection from spreading.
Why Some People Get More Cavities Than Others
Diet is the most obvious factor. Frequent snacking on sugary or starchy foods gives mouth bacteria a near-constant fuel supply. Sipping soda, juice, or sweetened coffee throughout the day is particularly damaging because it keeps the pH low for hours. Sticky foods like dried fruit, gummy candy, or even crackers that cling to tooth surfaces extend the duration of each acid attack.
Dry mouth is one of the biggest and most overlooked risk factors. Without adequate saliva, your mouth loses its primary acid-neutralizing and mineral-replenishing system. Many common medications cause dry mouth as a side effect, including antihistamines, antidepressants, decongestants, blood pressure medications (diuretics), anti-anxiety medications, pain medications, muscle relaxants, and asthma inhalers. If you take any of these and notice your mouth feels dry or sticky, that’s a real cavity risk worth addressing.
Tooth anatomy matters too. The back teeth (molars) have deep grooves and pits on their chewing surfaces where plaque collects easily and toothbrush bristles can’t always reach. Nine out of ten cavities occur in these back teeth. Teeth that are crowded or overlapping also create hard-to-clean pockets where bacteria thrive.
There’s also a bacterial component you don’t control. S. mutans isn’t something you’re born with. It’s typically transmitted from a caregiver to a child through sharing utensils, food, or close contact. Studies matching bacterial strains have confirmed that mothers are the most common source. The earlier and more heavily a child is colonized with these bacteria, the higher their cavity risk throughout life.
What Actually Prevents Cavities
Fluoride is the single most effective cavity-prevention tool available. It works in three ways: it helps damaged enamel remineralize, it makes the repaired enamel harder and more acid-resistant, and it interferes with bacterial acid production. You get fluoride from toothpaste, tap water in fluoridated communities, and professional treatments at the dentist. Using fluoride toothpaste twice a day is the simplest, most impactful habit for cavity prevention.
Dental sealants are a close second for protecting vulnerable teeth. A sealant is a thin coating painted onto the chewing surfaces of back teeth, filling in those deep grooves where bacteria accumulate. Sealants prevent 80% of cavities in back teeth over two years. They’re most commonly applied to children’s permanent molars shortly after they come in, but adults with deep grooves can benefit too.
Limiting how often you eat and drink sugary or acidic items matters more than limiting the total amount. Three pieces of candy eaten at once cause one acid attack. Three pieces spread across the afternoon cause three separate attacks, each lasting 20 to 30 minutes. Drinking water after meals, chewing sugar-free gum to stimulate saliva, and keeping snacks to defined times rather than grazing all day make a measurable difference.
If you have dry mouth from medications, staying hydrated helps but often isn’t enough on its own. Sugar-free lozenges or gum can stimulate whatever saliva production you still have. Saliva substitutes and oral moisturizing gels are available over the counter. And since your natural defenses are compromised, being consistent with fluoride toothpaste and keeping up with dental cleanings becomes even more important.

