Fillings are required when cavities form or teeth decay. This happens when bacteria in the mouth produce acids that attack teeth. In time, this acid dissolves away the teeth enamel and causes a hole. The dentist first removes the decayed tooth material, cleans the affected area, and then fills cavity with a filling material.