It could be an infection from your teeth or gums. Or you could have burned it when eating hot food. However, it is best to have it checked early. It is also a sign of cancer.
Until you can see a dentist, you should avoid spicy or salty foods, alcohol and excessively hot beverages. If it is very swollen, you should seek emergency treatment immediately as your breathing could be blocked.