The third molar, more commonly called the "wisdom tooth" tends to erupt during 22-27 yrs of age. As any tooth, it tends to erupt according to the space available. Maybe there isn't much space for it to erupt normally which is why it's impinging on the 2nd molar in front of it.
The pain is caused due to food impaction in this region and subsequent inflammation of the gum area around this troublesome tooth.
OTC pain killers like Signoflam, Flexon etc. help in reducing the pain by reducing the inflammation. Hope this helps! :)
Next Steps
Must schedule a date for a review even if the pain subsides. Advice would be to get it removed if the tooth position is inadequate.
Health Tips
Also try warm water and salt rinses 3-5 times /day.