Hopefully this won't ever happen to you, but if it does follow these tips:
1. Call your dentist as soon as possible for an appointment.
2. If severe enough, the pain can be decreased with some commercial products such as Ambesol, Ora-Jel Name it, etc.
3. Take aspirin, Tylenol or Motrin/Advil products to ease the pain.
The best treatment is to let your dentist help you right away. Teeth don't heal themselves. Sometimes a person will have a toothache for 2-3 days and it will "go-away". Don't be fooled! The problem is still there. Remember seeing your dentist early can prevent pain, expense and maybe even tooth loss.