Cavities are holes in your teeth caused by bacterial erosion. There are three parts to a tooth’s structure. The first and outermost layer is called enamel, and is the hardest substance produced by the body. Enamel coats the dentin to protect it from bacteria, harmful toxins, and sensations from hot and cold food. The dentin is the main structure of a tooth. It protects the nerves and blood vessels housed in the center of the tooth, in a hollow chamber called the pulp. The dentin and pulp are sensitive to pain, which is why enamel is needed to protect it. Tooth decay develops when bacteria erode and infiltrate enamel, then infect the dentin, causing holes (cavities) to form in its structure.