Wisdom teeth, aka third molars, aka 8s (they are the eight tooth counting back from your front tooth) are a flipping nuisance.
They typically erupt from age 18-21 and often get caught sideways (horizontal impaction) which means they don't fully erupt into the mouth. This leaves a flap of gum over the tooth which collects plaque, bacteria and various bits of yuk causing local inflammation which can get quite severe (swollen cheek, swelling under jaw).
Lower wisdom teeth are the worst culprits, they are more likely to get infected and are more difficult to take out.
If you get pain and swelling at the back of your mouth it is most likely to be a wisom tooth that is causing it and you must get to see a dentist immediatley. They will rinse out around the tooth, advise you on future care (which may involve extraction) and sometimes give you antibiotics if the infection is severe.
Swilling your mouth with warm salty water ( a couple of teaspoons of salt in a cup of warm water) will help reduce the infection if there is a delay in seeing the dentist.