Sometimes the pulp of a tooth gets irritated either by a trauma or a deep cavity and undergoes internal resorption. The cells of the pulp get all "riled" up and the pulp begins to resorb the tooth structure from the inside out. This is sort of like a little pacman eating away any tooth structure in front of it. It's the same process that happens when a new permanent tooth moves up under a baby tooth. Osteoclastic activity slowly begins to dissolve the root of the baby tooth till it's about gone. That's when the baby tooth gets loose. Well, you really don't want that to happen to a tooth from the inside out; especially a permanent tooth. It is rare, but I have seen this most often with baby teeth that have had a history of a large cavity. Most teeth do very well after a restoration, but a few can get internal resorption. It can happen with teeth that have sustained a trauma as well. In a baby tooth, it may not need treatment or it may even need to be removed depending on a lot of factors. It doesn't uaually cause any discomfort. If it's a permanent tooth, it may need a root canal to stop the process as shown here in an x-ray I found on the internet.