Folliculitis is a condition that results in the inflammation of the hair follicles. Follicles are the opening in your skin that holds the roots of your hair. Every hair on the body grows through a follicle. The infected hair follicles swell into small pus-filled pimples. Folliculitis is usually caused by a fungal or bacterial infection that occurs when you damage your hair follicles. The infection can spread to other follicles and cause scarring or permanent hair loss. Triggers of folliculitis include wearing tight hairstyles, shaving, curly hair, wearing hats and autoimmune factors.