Will be needing atleast a picture of your tooth to evaluate the situation.
Could be a lot of things :- cervical abrasion, cavity, periapical abscess may be followed by muscle spasm.
Next Steps
Should consult dentist if pain persists.
Health Tips
Warm saline rinse thrice a day may help ease the pain a little.
Note:- as suggested in earlier post,no hot pack or any pain balm should be applied on the site. It may make things worse if it is an infection.