How Styes Form: Blocked Glands and Infection

A stye forms when one of the tiny oil-producing glands along your eyelid becomes blocked, trapping secretions inside and creating the perfect environment for bacteria to multiply. The result is a red, painful bump that looks a bit like a pimple at the edge of your eyelid. Most styes last one to two weeks and resolve on their own, but understanding exactly how they develop helps explain why some people get them repeatedly and what you can do to prevent them.

The Glands Behind a Stye

Your eyelids contain dozens of microscopic glands that produce oils essential for keeping your eyes lubricated. These oils form the outermost layer of your tear film, preventing tears from evaporating too quickly. When one of these glands gets clogged, the oily secretions build up behind the blockage, the tissue swells, and bacteria already living on your skin surface take advantage of the stagnant environment.

The specific gland involved determines what type of stye you get. External styes, the most common kind, start in the glands of Zeis, which open directly into your eyelash follicles. That’s why external styes appear right at the base of an eyelash, with redness and swelling centered on the lash root. Internal styes form deeper in the eyelid, in the meibomian glands, which are larger oil glands embedded in the firm tissue (called the tarsus) that gives your eyelid its shape. Internal styes tend to “point” toward the inner surface of the eyelid rather than the outer skin, and you might see a yellowish spot on the inside of the lid when you pull it back.

How the Blockage Becomes an Infection

The process begins with the oil itself. Normally, the glands secrete a thin, clear oil that flows freely onto the eyelid margin. But when the gland secretions thicken and become sluggish, a condition called meibomitis, the gland opening gets plugged. Think of it like a clogged pore on your face, except on the delicate tissue of your eyelid.

Once the gland is blocked, the trapped oil has nowhere to go. It accumulates inside the gland, stretching the tissue and triggering inflammation. Bacteria, most commonly Staphylococcus aureus (a species that naturally lives on human skin), colonize the stagnant secretions. The immune system responds by sending white blood cells to the site, which is what produces the characteristic pus, swelling, and tenderness. Within a day or two, the bump localizes to the eyelid margin and becomes visibly swollen and painful to touch.

Stye vs. Chalazion

In its earliest stages, a stye and a chalazion look identical: both cause redness, swelling, and discomfort. But they diverge quickly. A stye stays painful and remains at the eyelid margin, driven by active bacterial infection. A chalazion, by contrast, forms when a blocked meibomian gland leaks its oily contents into surrounding tissue without infection. The body walls off the leaked oil with a granuloma (a small pocket of inflammatory cells), creating a firm, painless nodule in the center of the eyelid.

The practical difference matters because a stye will typically come to a head and drain on its own within one to two weeks, while a chalazion can persist for months as a hard, nontender lump. Sometimes a stye that doesn’t fully resolve transitions into a chalazion once the acute infection settles but the blocked material remains.

Why Some People Get Styes Repeatedly

Certain conditions make the gland secretions more likely to thicken and clog. Blepharitis, a chronic low-grade inflammation of the eyelid margins, is the most common underlying factor. People with blepharitis often have crusty, flaky debris along their lash line and persistently irritated eyelids, which creates ongoing risk for gland obstruction.

Other contributors include hormonal changes that alter oil composition, skin conditions like rosacea (which frequently affects the eyelids), and habits that introduce bacteria to the eye area. Touching or rubbing your eyes with unwashed hands, sleeping in eye makeup, and using expired cosmetics all increase the chance of a blockage becoming infected. Contact lens wearers who handle their lenses without proper hand hygiene face similar risks.

How a Stye Progresses

Most styes follow a predictable course. In the first day or two, you’ll notice localized tenderness and slight swelling at the eyelid margin. The area reddens and a small bump forms, often centered around a single eyelash. Over the next few days the bump fills with pus and becomes more prominent. Many styes eventually rupture and drain on their own, which brings rapid relief.

The full cycle from first symptoms to resolution typically takes one to two weeks. If pain and swelling haven’t started improving within 48 hours of home care, or if they actually worsen after the first two to three days, that’s a signal to see an eye doctor. A stye that grows unusually large or doesn’t respond to warm compresses may need to be drained professionally.

Reducing Your Risk

The most effective prevention strategy targets the root cause: keeping those tiny gland openings clear. Warm compresses applied to closed eyelids for 5 to 10 minutes help soften and loosen thickened oil, allowing it to flow normally. If you’re prone to recurrent styes, doing this daily (not just when a stye appears) can significantly reduce how often they come back.

Gentle lid hygiene also helps. After a warm compress, lightly massaging the eyelid margin with a clean fingertip or using a diluted baby shampoo scrub along the lash line removes the debris and bacteria that contribute to blockages. Replace eye makeup every few months, never share cosmetics, and always remove makeup before bed. If you wear contact lenses, wash your hands thoroughly before touching your eyes and follow the recommended replacement schedule for your lenses and lens case.

When a Stye Signals Something Serious

Rarely, the infection from a stye can spread beyond the bump itself into the surrounding eyelid tissue. This is called preseptal (periorbital) cellulitis, and it looks noticeably different from a simple stye. Instead of a localized bump, the entire eyelid or the skin around the eye becomes swollen, red, and tender to touch. If fever develops alongside worsening eye pain, vision changes, or the eye itself begins to bulge forward, the infection may have spread deeper into the eye socket, a condition called orbital cellulitis that requires emergency treatment.

These complications are uncommon, particularly in adults. But they illustrate why a stye that keeps getting worse rather than better deserves professional attention rather than continued watchful waiting.