Hello,
From the symptoms it sounded like folliculitis or cysts and you can apply the
topical antibiotics like
Mupirocin. For oral antibiotics, you need a prescription from your doctor. However if it is a cyst then no treatment is required but they become painful then it means they are infected, then surgical excision by traditional wide excision, minimal excision, and punch biopsy excision may be required.
I hope it helps. Take care and regards.