Sugar interacts with bacteria in the mouth to produce acids that erode tooth enamel, leading to dental caries or tooth decay. Limiting sugary foods and drinks can significantly reduce the risk of cavities.