Cavities, even very large ones, do not automatically make a tooth ache. The pain won't begin until the decay reaches the tooth's nerve. As with any infection, your body's defenses go into action. The body increases blood supply to the infected area. But since the nerve and the pulp are encased in an enamel tooth, the pressure of the increased blood flow causes the swelling and pain that accompanies a toothache. Pulpitis, the name for the acute stage of pulp infection, causes not only toothache but also pain when the teeth come together. That's because at this stage the infection has spread to the peridontal ligament, the membrane that holds the tooth's root in its socket. When the bacteria eventually kills the pulp, it may result in an abscess at the apex of the tooth's root.
Sometimes the tooth can be saved through a root canal. If it has been weakened beyond saving, you might need an artificial tooth. The best way to avoid this situation is to practice good oral hygiene at home and visit your dentist for periodic checkups.