The wisdom tooth is partially erupted and the flap over it lodges the food init causing the pus. From the picture it seems the tooth is out of alignment. If so, get it removed. If not, the flap over it can be removed.
But, the white patch/line seems to be cheek bite happening from wisdom tooth, so get it removed.
Visit your dentist soon.
Next Steps
Visit your dentist.