You are likely experiencing an acute apical periodontitis where the ligament around the tooth’s root and the bone becomes painfully inflamed. This is caused by one or more of the nerves in your tooth becoming infected. You need to see a dentist before this turns into a dental abscess which can make you very unwell.
Make an appointment to see a dentist