From the photo, it appears you have folliculitis. Folliculitis is inflammation of hair follicles and may or may not be due to a bacterial infection. Common bacteria causing folliculitis include staphylococci and streptococci species.
Milder forms of folliculitis respond to topical antiseptic washes such as triclosan, topical antibiotic solutions and/or a course of oral antibiotics such as doxycycline. Regular use of antiseptic washes for skin cleansing may help reduce/prevent recurrences.
Do see your doctor for a full clinical assessment and treatment.