Tooth decay, also known as dental cavities or dental caries, involves the formation of cavities (holes) when tooth structure dissolves. This occurs when certain bacteria in your mouth, given sugar and carbohydrates, produce acids that attack your tooth enamel. If these acids remain in your mouth, they can contribute to tooth decay and other dental problems.