A stye forms when one of the tiny oil or sweat glands along your eyelid gets blocked and then infected by bacteria. The process is surprisingly fast: a gland opening clogs, bacteria that normally live on your skin multiply inside the trapped material, and within a day or two a painful, pus-filled bump appears at the edge of your eyelid. In 90 to 95 percent of cases, the bacterium responsible is Staphylococcus aureus, the same common skin microbe behind many minor infections elsewhere on the body.
The Step-by-Step Process
Your eyelids are lined with dozens of small glands that produce oils and moisture to keep your eyes lubricated. Each gland has a tiny opening near your lash line. When dead skin cells, dried oil, or debris plug one of those openings, the gland keeps producing secretions with nowhere to go. That stagnant pocket becomes an ideal breeding ground for bacteria already present on your skin.
As bacteria multiply, your immune system sends white blood cells to the site. This triggers inflammation: redness, swelling, warmth, and tenderness. Within one to two days, the infection localizes into a visible bump at the eyelid margin, often with a small white or yellowish head where pus has collected. Most styes then rupture and drain on their own within two to four days, which relieves the pain and allows healing to begin.
External vs. Internal Styes
Not all styes form in the same place because your eyelid contains different types of glands at different depths.
An external stye is the more common type. It develops in one of the small oil glands (called Zeis glands) or sweat glands (Moll glands) right at the base of an eyelash. Because these glands sit near the skin surface, the bump is visible on the outside of your eyelid and tends to come to a head quickly.
An internal stye forms deeper, in the larger oil-producing glands embedded in the firm tissue of the eyelid itself (meibomian glands). These styes point inward toward the eye rather than outward, so you may feel a painful lump without seeing an obvious pimple-like spot. Internal styes can take longer to resolve and are more likely to leave behind a painless, lingering nodule if the gland stays clogged after the infection clears.
Styes vs. Chalazia
A chalazion looks similar to a stye but forms through a different process. While a stye is an active bacterial infection that hurts, a chalazion is a non-infectious inflammatory reaction. It happens when a blocked meibomian gland leaks its oily contents into the surrounding tissue, triggering your immune system to wall off the material with a firm, rubbery lump. The key difference you’ll notice: styes are tender to the touch, while chalazia generally are not. A stye that doesn’t fully drain can sometimes transition into a chalazion over time.
What Makes Styes More Likely
Anything that increases the chance of gland blockage or introduces extra bacteria to your eyelid raises your risk. Chronic eyelid inflammation (blepharitis) is one of the biggest contributors. People with blepharitis have persistently irritated, flaky lid margins, which means their gland openings are more prone to plugging. Skin conditions like rosacea can also affect the oil glands in the eyelids, making blockages more frequent.
Touching or rubbing your eyes with unwashed hands is another common trigger. Your fingers carry bacteria directly to your lash line, and the friction can push debris into gland openings. Contact lens wearers who handle their lenses without proper hand hygiene face the same issue. Stress and sleep deprivation don’t cause styes directly, but they can suppress immune function enough that your body is slower to keep normal skin bacteria in check.
Eye Makeup and Bacterial Growth
Cosmetics deserve special attention because they can both block glands and harbor bacteria. Creamy or liquid eye makeup is particularly hospitable to bacterial growth over time. The American Academy of Ophthalmology recommends replacing eye makeup every three months for this reason. Applying liner or shadow inside the lash line is especially problematic because it can physically seal off gland openings. Glitter makeup adds another layer of risk, as small particles can irritate the lid margin and promote inflammation. Sharing eye makeup, even with close friends or family, transfers bacteria between people and should be avoided.
How Most Styes Heal
The majority of styes resolve without medical intervention. The standard home treatment is a warm, moist compress applied to the closed eyelid for 5 to 10 minutes, repeated 3 to 6 times a day. The warmth helps soften the blocked material inside the gland, encourages the stye to drain naturally, and increases blood flow to help your immune system clear the infection. Use a clean washcloth soaked in comfortably warm water, not hot. Microwaving a wet cloth can create uneven hot spots that burn the delicate eyelid skin.
Resist the urge to squeeze or pop a stye. Forcing it open can push the infection deeper into the eyelid or spread bacteria to neighboring glands, potentially causing multiple styes at once. Let it drain on its own. Once it does, the pain typically drops off quickly, and the remaining swelling fades over the following days. The full cycle from first twinge to complete resolution usually takes about a week, though some styes linger slightly longer.
Signs of a More Serious Problem
Most styes are minor annoyances, but in rare cases the infection can spread beyond the eyelid. Watch for swelling that extends past the lid into the skin around the eye socket, a bulging eye, pain when moving the eye, changes in vision, or fever. These symptoms can indicate orbital cellulitis, a serious infection of the tissue surrounding the eye that requires prompt medical treatment. In children especially, a high fever combined with eye swelling or bulging warrants an emergency room visit. If a stye doesn’t improve after a week of warm compresses, or if you keep getting styes in the same spot, a doctor can evaluate whether you need additional treatment or whether an underlying condition like blepharitis needs to be addressed.
Reducing Your Risk
Keeping your eyelids clean is the single most effective prevention strategy. A gentle daily wash along the lash line with warm water, or with a diluted baby shampoo if you’re prone to flaky buildup, helps keep gland openings clear. Wash your hands before touching your face or handling contact lenses. Replace eye makeup every three months, always apply it outside the lash line, and throw out any products you were using if you develop an eye infection. If you wear contacts, follow your lens care routine carefully, as skipping cleaning steps introduces exactly the kind of bacteria that cause styes.

