Styes form when bacteria infect one of the small oil or sweat glands along your eyelid margin. The culprit is almost always Staphylococcus aureus, a common skin bacterium that normally lives on your face without causing problems. When conditions allow it to multiply inside a blocked gland, you get a painful, red bump that looks like a pimple on your eyelid. Understanding exactly how that happens can help you avoid one.
What Actually Happens Inside Your Eyelid
Your eyelids contain dozens of tiny glands that produce oil and sweat to keep your eyes lubricated. When one of these glands gets clogged with dead skin cells, dried oil, or debris, bacteria that were sitting harmlessly on your skin can become trapped inside. Cut off from the surface, they multiply rapidly, triggering an immune response that produces the swelling, redness, and tenderness you recognize as a stye.
There are two types, depending on which gland is involved. An external stye affects the smaller oil or sweat glands (called Zeiss and Moll glands) right at the base of your eyelashes. These are the most common kind and tend to form a small yellowish pustule surrounded by swollen, red skin. An internal stye develops deeper in the eyelid, in the larger meibomian glands that line the inner surface. Internal styes are less visible from the outside but can be more painful, and when they drain, pus tends to release on the inner surface of the eyelid rather than near the lash line.
Habits That Introduce Bacteria
The most direct way to develop a stye is to transfer bacteria from your hands, tools, or cosmetics to your eyelid margin. Touching or rubbing your eyes with unwashed hands is the single most common trigger. Every time you press a finger against your lash line, you’re potentially pushing staph bacteria into a gland opening.
Eye makeup is another major route. When you apply mascara, eyeliner, or eyeshadow, applicators repeatedly touch both the product and your eyes, transferring bacteria back and forth. Over time, the product itself becomes contaminated. Old makeup is especially problematic: mascara and liquid eyeliner should be replaced every four months, while solid eye pencils can last up to a year. Beyond expiration dates, leaving makeup on overnight fuels bacterial growth along the eyelid, giving those organisms hours of uninterrupted contact with gland openings. Sharing eye makeup or applicators with someone else introduces entirely new bacterial populations to your lids.
Contact lens wearers face a similar risk if they handle lenses without thoroughly washing their hands first, or if they skip proper lens cleaning routines.
Conditions That Make Styes More Likely
Some people get styes repeatedly, and the reason is usually an underlying condition that keeps their eyelid glands chronically inflamed or clogged.
Blepharitis, a persistent low-grade inflammation of the eyelid margins, is one of the most common links. It creates a cycle where flaky debris accumulates along the lash line, blocks gland openings, and gives bacteria a foothold. People with blepharitis often notice crusty buildup on their eyelashes when they wake up.
Ocular rosacea is another significant contributor. This condition inflames the eyelids and disrupts the meibomian glands that produce the oily layer of your tear film. When those glands don’t produce healthy oils, the tear film destabilizes, the eyelid stays irritated, and gland blockages become frequent. If you have facial rosacea (persistent redness, visible blood vessels, or acne-like bumps on your cheeks and nose), your eyes may be affected too, even if the eye symptoms seem unrelated.
Meibomian gland dysfunction can also exist on its own, without rosacea. In this case, the oil glands simply produce thickened secretions that plug up more easily. This is more common as you age and is a frequent cause of both dry eye and recurring styes.
How a Stye Differs From a Chalazion
In the first day or two, a stye and a chalazion can look identical, which is why people sometimes confuse them. But they diverge quickly. A stye stays painful and localizes right at the eyelid margin, often forming a visible yellowish head near an eyelash. You might also notice tearing, light sensitivity, or a feeling like something is stuck in your eye.
A chalazion, by contrast, migrates toward the center of the eyelid body and becomes a small, firm, painless nodule. It’s caused by a blocked gland too, but without the acute bacterial infection. Think of a chalazion as a clogged gland that became a cyst, while a stye is a clogged gland that became infected. A stye can sometimes turn into a chalazion if the infection resolves but the blockage remains.
Who Gets Styes Most Often
Styes are extremely common. Most people will develop at least one during their lifetime, and many people get them repeatedly. You’re at higher risk if you regularly wear eye makeup, have blepharitis or rosacea, tend to rub your eyes frequently, or experience high levels of stress or sleep deprivation (both of which can shift the balance of bacteria on your skin). People who have had one stye are statistically more likely to get another, partly because the same habits or underlying conditions that caused the first one tend to persist.
Reducing Your Risk
Since styes start with bacteria entering a blocked gland, prevention targets both sides of that equation. Keeping your hands away from your eyes is the simplest step. If you must touch your eyelids, wash your hands with soap first.
For makeup users, the key practices are replacing mascara and liquid eyeliner every four months, never sharing eye products, and removing all eye makeup before bed every night. If you’ve had a stye recently, throw away any eye makeup you used during or just before the infection. Reusing contaminated products can reintroduce the same bacteria and start the cycle over.
If you get styes more than once or twice a year, a daily lid hygiene routine can make a real difference. This means gently cleaning your eyelid margins each morning with a warm, damp washcloth or a commercial lid scrub. The warmth helps loosen any thickened oil in the glands, and the gentle scrubbing removes the debris and bacteria that accumulate overnight. Warm compresses held against closed eyelids for five to ten minutes can also soften gland secretions and keep them flowing freely.
For people with blepharitis or ocular rosacea, managing the underlying condition is the most effective way to break the pattern of recurrent styes. That typically involves consistent daily lid care and, in some cases, treatment specifically targeting the inflammation or gland dysfunction.

