The main cause of the pain of a wisdom tooth is its lack of space in the mandibular bone, causing the tooth to be placed incorrectly and trapped. However, there are times when the tooth manages to make its way and partially erupt, leaving a hole where the food bacteria can accumulate and cause an infection.
When these bacteria proliferate and begin to accumulate under the gum flap that has created the wisdom tooth, a tapered infection occurs that will subsequently cause swelling and pain in the entire area around the tooth.