What Is a Cavity? Causes, Stages & Prevention

A cavity is a small hole in a tooth caused by decay. It forms when bacteria on your teeth produce acid that eats through the hard outer surface, creating permanent damage that needs to be repaired by a dentist. Cavities are extremely common: nearly 21% of American adults between 20 and 64 have at least one untreated cavity right now, and the numbers are similar across every age group from toddlers to seniors.

How a Cavity Forms

Your mouth is home to hundreds of species of bacteria, but the main culprit behind cavities is one called Streptococcus mutans. These bacteria feed on sugars and starches left on your teeth after you eat, and they produce acid as a byproduct. That acid attacks tooth enamel, the hard, mineral-rich outer shell of your teeth and the hardest tissue in your body.

Enamel starts to break down when the pH on the tooth surface drops below 5.5, which is roughly the acidity of black coffee. At that threshold, minerals like calcium and phosphate begin dissolving out of the enamel in a process called demineralization. Every time you eat something sugary or starchy, this acid attack lasts about 20 to 30 minutes before your saliva can bring the pH back to a safe level. If those attacks happen faster than your teeth can recover, the enamel weakens, and eventually a hole forms.

Your Mouth’s Built-In Defense System

Saliva does more than keep your mouth moist. It’s a natural repair fluid that works against cavities in several ways. It contains calcium and phosphate ions that can actually redeposit into weakened enamel, patching early damage before a cavity fully develops. It also carries bicarbonate, phosphate compounds, and specialized proteins that act as buffers, neutralizing the acid that bacteria produce. People with reduced saliva flow, whether from medications, medical conditions, or dehydration, lose this protection and tend to develop cavities much faster.

The Five Stages of Tooth Decay

Cavities don’t appear overnight. They progress through distinct stages, and catching them early makes a significant difference in treatment.

White spots. The earliest sign is a chalky white spot on the tooth where minerals are being lost. At this point, the damage is reversible. Fluoride treatments and improved brushing can help the enamel rebuild itself.

Enamel breakdown. If demineralization continues, the white spot may darken to brown, and the enamel surface breaks down enough to form an actual hole. This is the point most people think of as “getting a cavity.” Once a hole forms in enamel, it can’t heal on its own and needs a filling.

Dentin decay. Beneath enamel sits a softer layer called dentin. Once decay punches through the enamel and reaches dentin, it speeds up considerably because dentin is less mineralized and more vulnerable to acid. This is also when you’re likely to start feeling sensitivity or pain, because dentin contains thousands of tiny fluid-filled tubes that connect to the nerve inside the tooth. When these tubes are exposed, temperature changes and pressure cause the fluid inside them to shift, triggering a pain signal. That sharp zing from a cold drink or a bite of candy is this mechanism at work.

Pulp damage. At the center of every tooth is the pulp, a soft core of blood vessels and nerves. When decay reaches the pulp, infection sets in, often causing a persistent, throbbing toothache. Treatment at this stage typically requires a root canal, where the infected pulp is removed, the inside of the tooth is cleaned and sealed, and a crown is placed over the top.

Abscess. Left untreated, infection from the pulp can spread to the jawbone and surrounding tissue, forming a pocket of pus called an abscess. This is the most serious stage. It can cause facial swelling, fever, and significant pain. In severe cases, the tooth may need to be extracted entirely.

Why Some People Get More Cavities

Diet is the most obvious factor. The more frequently you eat sugary or starchy foods, the more acid attacks your teeth face throughout the day. Sipping soda over several hours is worse than drinking it all at once, because it extends the window of low pH on your teeth.

But genetics, saliva quality, and oral bacteria composition all play roles too. Some people naturally produce saliva with stronger buffering capacity, meaning their mouth recovers from acid attacks more quickly. Others have deeper grooves on their molars where bacteria can hide and brushing can’t easily reach. Dry mouth from medications (antihistamines, antidepressants, and blood pressure drugs are common culprits) significantly raises cavity risk. So does frequent acid reflux, which introduces stomach acid into the mouth.

How Fluoride Protects Teeth

Fluoride works by changing the chemistry of enamel itself. Tooth enamel is made of a mineral called hydroxyapatite, which begins dissolving at pH 5.5. When fluoride is present, it swaps into the mineral structure, creating a modified form that doesn’t start dissolving until pH drops to 4.6. That’s a meaningful difference: it means your teeth can withstand significantly stronger acid before any damage begins. Fluoride also helps attract calcium and phosphate from saliva back into weakened spots, accelerating the natural repair process. This is why fluoride toothpaste, fluoridated water, and professional fluoride treatments are the most evidence-backed tools for cavity prevention.

What Getting a Cavity Fixed Looks Like

For most cavities caught at the enamel or dentin stage, treatment means a filling. Your dentist numbs the area, removes the decayed portion of tooth, and fills the space with a restorative material. The two most common options are composite resin (tooth-colored) and amalgam (silver-colored). Composite fillings have become the standard in most practices, and recent data from an eight-year study found they actually had a lower failure rate (about 12%) compared to amalgam fillings (about 17%) over the same period. Both types can last many years, though fillings don’t last forever. They can crack, wear down, or develop new decay around their edges, eventually needing replacement.

For deeper decay involving the pulp, a root canal removes the infected tissue inside the tooth. Despite its reputation, modern root canal treatment is comparable in discomfort to getting a filling. Recovery typically takes a few days of mild soreness. A crown placed afterward protects the remaining tooth structure, which becomes more brittle without its living core.

Preventing Cavities

The basics are straightforward: brush twice a day with fluoride toothpaste, floss daily to clean the surfaces between teeth where your brush can’t reach, and limit how often you eat sugary or acidic foods. The frequency of sugar exposure matters more than the total amount. Five pieces of candy spread across the day causes more damage than the same five pieces eaten at once, because each exposure restarts that 20-to-30-minute acid cycle.

Drinking water after meals helps rinse away food particles and dilute acid. Chewing sugar-free gum stimulates saliva production, which speeds up the mouth’s natural recovery. Dental sealants, thin coatings painted onto the chewing surfaces of back teeth, can block bacteria from settling into the grooves of molars and are especially effective for children. Regular dental cleanings remove hardened plaque (tarite) that you can’t get off with a toothbrush alone, and routine exams catch decay in the early white-spot stage when it can still be reversed without drilling.