THIS IS NOT A DIAGNOSIS as that requires an actual dental examination.
The pain could be because of periodontitis, or it could be because of food lodgment in interdental gaps etc.
The fact that you are having periodic pain (a couple of hours everyday) needs some clarification. So your query may be better answered if a few additional details were available 0(for example is the pain usually occurring after certain hot/cold/acidic/hard/etc foods or drinks are taken).
Depending on proper examination, the treatment therefore could vary from gap closure to Scaling and Polishing. The type of cleaning (Subgingival or Superficial or laser assisted periodontal therapy, etc ) will vary depending on your specific case.
Next Steps
Consult your dentist for a personalized treatment plan.
Health Tips
Warm Saline Gargling and proper flossing might provide some temporary relief.