From the description it seems, you had a sebaceous cyst
which later on got infected or inflammed and hence became sore, painful and larger in size.
Right now you need a prescription of oral antibiotics
along with Oral antiinflammatory analgesics to settle the infection. Once the infection clears off, you might get the cyst surgically excised.
Hope that helps. Take care