Cavities are caused by food acid that erodes the tooth enamel. Many cavities start to develop in the tiny spaces between teeth or in the pits of the back molar teeth, making it very hard to detect unless you are a trained dentist.