Tooth decay is an infectious and contagious disease. Cavities do not hurt at first when they are small and only affect enamel or enamel and dentin. If detected at this early stage, by conducting a filling injury heals.
But if the decay progresses reaching the nerve will cause a sharp pain. Then there will be enough with a simple filling, but will have to perform a root canal and even if the tooth decay has destroyed much, we must also put a cover.