Cavities arise due to an infectious process that leads to gradual deterioration of the structure of your tooth. Despite originating as a small flaw in the outermost layer of enamel, untreated tooth decay gradually undermines increasing amounts of healthy tooth material as it advances towards the inner layers of your tooth.