That appears to be an apthous ulcer or Canker sore. Usually pretty painful but self limiting to about 2 weeks. There oare over the counter options to numb the area and a few things your dentist can do to speed healing. If they have a laser, they can treat that in office and there is a prescription for a topical steroid that greatly assists healing. See your dentist for the best option for you