There are many reasons for dental pain. Most common is a dental infection. A tooth may have decay too far into the nerve to be repaired by a filling only. It may require a root canal or even extraction. Most of the time if there is infection present, the doctor will prescribe an anti-biotic to be taken after procedure to continue the healing process of the infection.
Dr. James L. Johnson