A stye is the equivalent of a pimple on the upper or lower eyelid. Styes are caused by blockage of an oil producing gland, which then becomes infected by resident skin bacteria trapped inside. In this way, it is very similar to other small skin infections such as acne or abscesses. Styes usually do not pose a serious threat to the eye or eyelid (although in rare cases the infection can spread, resulting in a skin infection around the eye called cellulitis, which requires medical treatment). That is why it’s a good idea to visit an ophthalmologist. Styes will usually heal on their own over the course of a few days to a couple weeks. The best way to treat a stye is to apply warm compresses (a washcloth soaked in warm water) to the affected eyelid for 10-15 minutes three times a day.
This will help the pus trapped in the stye to come to the surface of the skin. Do not try to rupture stye yourself, allow it to burst on its own through the repeated use of warm compresses. If the the stye does not heal on its own within a couple weeks, or it becomes larger, more painful, or associated with spreading redness and swelling around the eye, it is time to go see an ophthalmologist. If a stye is not healing, antibiotic ointments can be prescribed and, in extreme cases, a procedure may be required to drain pus and remove infected tissue. In the meantime, regularly use hot compresses as described above, clean your face and eyelids regularly with clean running water and gentle facial soap, and avoid use of eye makeup and other irritants until the stye fully heals.