Swelling is generally due to presence of infection. Tooth decay or gum infection cause the infection around your teeth and gums. It should be treated with either extraction or root canal treatment. For temporary purpose, doctor can give you antibiotics and pain killer to get relief.