The pain could be because of 3rd molar or wisdom tooth eruption, caries in the molar or any TMJ related issue. It could be also because of malaligned tooth and stress induced pain.
Next Steps
kindly visit to the nearest dentist for further radiographic examinations.
Health Tips
For temporary relief, you can use hot or cold compaction on the place of pain for few minutes.