The pain and swelling could be due to many reasons like abscess formation, injury to soft tissues, cysts, etc.
Tests like x-ray, blood test, ultrasound etc can be helpful for detecting the cause of it. You can take pain
pills and anti inflammatory for relief. You must also consult an expert for the same. Hope it helps. Take care
and keep posting.