Wisdom teeth, or 3rd molars are the last set of permanent teeth to erupt and usually come in sometime after age 17. Some people have enough room for their wisdom teeth to come in and are able to keep them and use them just like any other teeth. However, most people do not have enough room in their mouth or the teeth come in sideways and can cause cavities on the teeth next to them. Other times the mouth is just too crowded with the wisdom teeth for the person to keep them clean on their own and will get cavities which can cause a toothache.
In this panoramic X-ray, the top wisdom teeth and bottom right were hard to keep clean and got cavities in them. The lower left of the X-ray shows another wisdom tooth coming in horizontally and becomes impacted, which can cause problems with the tooth in front of it.