Cavities, also known as dental caries or tooth decay, are caused by a combination of factors, primarily involving the interaction between bacteria in the mouth and sugars from the food and drinks we consume.