Based on your description of pain on the scalp it looks like a superficial bacterial infection usually caused by staphylococcus aureus. Sometimes they co-exist with fungal folliculitis and can be determined with more precision during a consultation. Kindly consult a dermatologist for exact diagnosis and treatment plan. It is also important to prevent their relapse once you have got it cured. A decolonization regimen suggested by your doctor will help to prevent relapses.
Next Steps
Your dermatologist will decide a treatment plan for you after a consultation.
Health Tips
You can consult me on Practo Direct for personal recommendations.