A cavity results when a tooth has been deteriorated due to the enamel (hard outer protection of the tooth) of the teeth being softened and worn down. The enamel of your teeth can decay from being exposed for long periods of time to acidic materials such as sugars and starches. If not treated properly, the cavity can infect the dentin of your teeth (the tissue underneath the enamel) and eventually even the pulp (living tissue and blood vessels in the center of the tooth).