These are the tiny holes created inside the teeth which are caused by the microorganisms present inside the mouth. These are mutant streptococci bacteria that are present inside the mouth since the time of birth.
The intake of high sugary foods such as cakes, ice-creams and other sticky foods that stick in between the teeth cause the increase in population of these bacteria which results in over production of lactic acid.
These bacteria are potent towards the lactic acid but it can cause problem to the strong covering of the teeth called as the enamel. This enamel is eroded due to the actions of these microorganisms. The increased bacteria inside the mouth causes tiny hole formation in the teeth. These bacteria then travel done the dentine portion of the teeth which is present below the enamel region.
The nerves and the blood vessels are all covered in the pulp region of the teeth. The bacteria through the dentine reaches the pulp region. This causes sharp pain sensation in the teeth as the nerves gets exposed to the bacterial invasion. If the cavity is left untreated, then the teeth gets completely affected and it results in the removal of the teeth from the mouth.
In some people, the cavities are inherited from the parents directly. Nowadays, due to various modern techniques such as filling of the cavities and also removal of the teeth and also the toothpaste as well as the water supplies contain a few amount of flouride in it which increases the strength of the enamel inside the tooth. Also, decrease in the intake of high sugary foods helps in reducing the risk of getting cavities inside the tooth and also with the help of regular brushing and flossing of the teeth, the cavities can be reduced inside the teeth.