Visit your Dentist. There are many causes of toothache but the most likely one is dental decay. This is a progressive bacterial disease and if it has reached the second layer of your tooth (dentine) then it rapidly progresses and turns your whole tooth into mush.
When the decay destroys your dentine and reaches your nerve you will be in for any one of these symptoms or some combined: incredible pain, infection, a swollen face (abscess), sleepless nights, unable to eat or apply pressure to the tooth, unable to even touch the tooth. This is when the decay goes into your nerve. To solve this problem you will need either a Root Canal Treatment or Extraction.
Hopefully, it has not gone that far. Decay that is only in the first layer of the tooth (enamel) or second (dentine) can be solved with a filling. This will "get rid" of the toothache.