A stye is an infection in the oil glands around the eyelid. The infection and resulting inflammation cause a red bump to arise along the eyelid, often causing pain for the patient. Sties are not harmful as a general rule, although they could potentially spread infection to other parts of the eye, and they usually resolve at home with basic treatment. Some people seek medical attention for sties because of the pain, in which case there are some additional treatment options.
Sties happen when bacteria gets inside the sebaceous glands around the eyelashes, causing an infection. Staphylococcus bacteria is one of the leading culprits behind sties, although other bacteria can contribute to the formation of a stye as well. As the infection sets in, the skin around the area starts to get inflamed, puffing up and turning red, and classically there's a small white to yellowish dot in the middle of the stye.
The body is quite adept at healing itself, and a stye can resolve with no medical attention. However, applying warm compresses can ease the inflammation and encourage the stye to open, allowing the infectious agents to drain and promoting more rapid healing. Some people also take aspirin for the inflammation. Eating a healthy diet also tends to help sties resolve, as nutritional deficiencies can weaken the immune system's fighting abilities.
Doctors can offer antibiotic ointments for a stye, or lance the stye so that it drains. This must be done carefully, because the stye is right next to the eye, and unsteady fingers could leave to damage of the eye or eyelid. Unless the stye is large or especially irritating, many doctors recommend warm compresses and no additional treatment.
You may also hear a stye referred to as a hordeolum, a fancier term for the same thing. Sties are closely linked with chalazions, which are lumps formed by blocked oil glands at the eyelid. A chalazion can be caused by a stye which failed to heal, or through other sources of blockage. Chalazions are treated much like sties, with warm compresses and patience.
There are some ways to avoid sties. Washing your face regularly and keeping your hands away from your eyes reduces the risk of introducing bacteria to the sebaceous glands, and eating a healthy diet keeps your immune system strong, making it harder for bacteria like staph to get a foothold.