A swollen hair follicle is most likely either infected, or you may have an ingrown hair. The proper treatment for your hair follicle will depend on the cause of the swelling. Infected hair follicles can typically be treated with over-the-counter topical antibiotics rubbed into the skin. If the infection was caused by a fungus, anti-fungal medications might be able to take care of it. Ingrown hairs are treated differently and can normally be taken care of at home without a doctor visit or any special medication.
Some people may notice a swollen hair follicle that is tender or painful to the touch soon after exiting a hot tub or heated pool. This is because heated water is the primary culprit for a certain type of bacteria that causes folliculitis. If your swollen hair follicle shows up not long after you've used a hot tub or pool, check to see if there are other swollen hair follicles alongside it because they usually appear in small patches. You can attempt to treat your swollen hair follicle with the use of over-the-counter topical antibiotic cream. If this does not work, the infection might be fungal, in which case you can try an anti-fungal cream on your skin.
If your swollen hair follicle is isolated and there are no other red, itchy bumps around it, you may have an ingrown hair. You might be able to remedy this by using a pair of tweezers and attempting to pluck the hair out of your skin. This could be tricky because it may be necessary to dig around just beneath your skin to find it. If you successfully get it plucked out, be sure to sanitize the area afterward to keep it from getting infected. Once the hair is gone, the swelling should go down, but keep in mind that the hair may always grow back in at an awkward angle, and you may have to keep plucking it out to prevent it from bothering you.
If your swollen hair follicle does not appear to be the result of an ingrown hair and no topical medication you apply to the area seems to work, you should see a doctor. It is likely that the problem is something you cannot treat yourself. A doctor can examine the hair follicle and determine what is causing it. You may end up needing prescription medication to effectively get rid of your swollen hair follicle.