The bacteria in your mouth need food to live and multiply. When you eat sugary foods, or even starches such as rice, the bacteria use them as food, too. The bacteria then produce acids that can dissolve tooth enamel.
Once the decay breaks through the enamel to cause a cavity, the damage is permanent. A dentist must clean out the decay and fill the cavity. Left untreated, the decay will get worse. It can destroy a tooth all the way through the enamel, through the inside dentin layer and down to the pulp or nerve of the tooth. That’s why it is important to treat caries at a very early stage, when the process can be reversed.