It's because of tooth related infection in the gums bone causing formation of pus inside it.Hense causing small boil or swelling over the tooth which is coming off & on .
Don't worry about it.
It has solution .
Next Steps
visit dentist for further clinical examination
Health Tips
gargle with lukewarm salt water after every meals to maintain oral hygiene