It can due to a gum problem( periodontitis or pericoronitis )
Or
It can be due to a tooth problem ( tooth decay or fractured tooth )
Next Steps
See a dentist who will take an x Ray and suggest you the treatment
Health Tips
Do not apply anything hot or any balms like zandu balm or zinda tilsmath to the swollen area