A cavity is a small hole that forms inside the tooth because of tooth decay. Cavities are formed when plaque buildup on the outside of the tooth combines with sugars and starches in the food you eat. This produces an acid that can eat away the enamel on your tooth. If a cavity is left untreated, it will eventually cause pain and can lead to more serious oral health problems including infections and abscesses. Cavities can be prevented by remembering to brush your teeth at least two times a day and floss between teeth at least once.