Causes of toothache due to caries/ cervical abrasion , traumatic injury but sometimes gums swelling (pockets ). If pain with hot sensation is indication of root canal treatment. But after curettage (gums cleaning) it will resolve than cause of pain was gums deposition (pockets) & no need of rct.
Next Steps
so please consult to dentist and x-ray of affected tooth is required for diagnosis.
Health Tips
warm saline rinses is useful and avoid hot fomentation.