Whats your age?
There could be tonsillar infection ie infection in tonsils .
You must consult an ENT specialist
and get examined to check out for tonsillitis
You may need to take antibiotics and anti inflammatory medicines.
For the time being you can take lukewarm saline gargles to get relief.
Stop eating outside food .
eat soft diet
If young then you can plan for tonsil removal by surgery if you happen to have such problem again and again.