How Do You Get Styes: Causes, Types, and Prevention

Styes form when bacteria infect one of the tiny oil or sweat glands along your eyelid margin. The culprit is almost always Staphylococcus aureus, a common bacterium that lives on your skin and can slip into a gland when it becomes blocked. The result is a small, painful abscess that looks like a pimple on your eyelid, typically lasting one to two weeks before it resolves on its own.

What Happens Inside Your Eyelid

Your eyelids contain dozens of small glands that produce oils and moisture to keep your eyes lubricated. When one of these glands gets clogged, its secretions stagnate. That stagnant oil becomes a breeding ground for S. aureus bacteria, which are already present on most people’s skin. The immune system responds by flooding the area with white blood cells, forming a pocket of pus and dead tissue: an abscess you can see and feel as a tender, red bump.

External vs. Internal Styes

Not all styes form in the same spot. An external stye develops on the outer edge of your eyelid, at the base of an eyelash. It involves the smaller oil and sweat glands (called the glands of Zeis or Moll) that open right at your lash line. These are the ones most people picture when they think of a stye: a visible, whitehead-like bump you can see without flipping your eyelid.

An internal stye forms deeper inside the eyelid, in the larger oil-producing glands (meibomian glands) embedded in the firm tissue of the lid itself. Internal styes tend to be more painful because of their location and may not be visible from the outside. You might notice them as a swollen, tender lump that points toward the inner surface of your eyelid rather than the skin side.

Everyday Habits That Raise Your Risk

Most styes trace back to something that either introduced bacteria to your eyelid or blocked a gland. These are the most common triggers:

  • Touching your eyes with unwashed hands. This is the single most direct way bacteria reach your eyelid glands. Any time you rub your eyes, adjust contact lenses, or apply eye drops without washing your hands first, you’re transferring skin bacteria to a vulnerable area.
  • Sleeping in your makeup. Leftover mascara, eyeliner, or foundation can block gland openings overnight, trapping oil inside and creating the conditions bacteria need to multiply.
  • Using old or shared cosmetics. Mascara should be replaced every three months, eyeliner every six months, and eyeshadow at least once a year. If a product changes in texture, smell, or consistency, it’s likely contaminated. Sharing eye makeup is a direct route for spreading bacteria between people.
  • Lining your waterline. Applying eyeliner to the inner rim of your eyelid can physically block the meibomian gland openings, setting the stage for an internal stye.
  • Dirty makeup brushes. Brushes and sponges should be washed with gentle soap and warm water at least once a week and allowed to dry completely before use.
  • Poor contact lens hygiene. Handling lenses with dirty fingers or wearing them longer than recommended increases the chance of transferring bacteria to your eyelids.

Chronic Conditions That Make Styes Recurrent

Some people get styes repeatedly, and that pattern often points to an underlying eyelid condition rather than a one-time hygiene lapse. Meibomian gland dysfunction (MGD) is the most common driver of chronic styes. In MGD, the oil glands in your eyelids don’t work properly: their secretions thicken and clog the gland openings, creating a cycle of blockage and infection. If you find yourself dealing with styes several times a year, MGD is a likely contributor.

Blepharitis, a chronic inflammation of the eyelid margins, is closely linked to both MGD and recurrent styes. It causes crusty, flaky buildup along the lash line that can block glands and harbor bacteria. The two conditions frequently overlap and reinforce each other.

Certain skin conditions also increase your risk. Acne rosacea and seborrheic dermatitis both affect oil production and skin inflammation in ways that extend to the eyelids. If you have either condition, you’re more likely to develop styes and chalazia (the non-infectious lumps that can form when a blocked gland becomes chronically inflamed rather than infected).

Styes vs. Chalazia

A stye and a chalazion can look similar, but they feel different and have different causes. A stye is an active bacterial infection. It’s red, swollen, and tender to touch, often with a visible pus-filled head. It usually hurts.

A chalazion is not an infection. It forms when a blocked meibomian gland leaks its oily contents into the surrounding tissue, triggering an inflammatory reaction rather than a bacterial one. Chalazia are firm, painless nodules that develop more slowly and can linger for weeks or months. A stye that doesn’t fully drain can sometimes evolve into a chalazion over time.

What Healing Looks Like

Most styes resolve on their own within one to two weeks without any medical treatment. The bump gradually comes to a head, drains (often while you sleep or during a warm compress), and shrinks. Warm compresses are the standard home remedy: a clean washcloth soaked in warm water, held against the closed eyelid for 10 to 15 minutes several times a day. The warmth helps loosen the clogged oil and encourages the stye to drain naturally.

Resist the urge to squeeze or pop a stye. Forcing it open can spread the infection deeper into the eyelid or to the surrounding skin. If a stye doesn’t improve after two weeks, grows significantly larger, affects your vision, or causes swelling that spreads beyond the eyelid, it may need antibiotic drops, ointment, or in rare cases a minor drainage procedure.

Preventing the Next One

Since styes are fundamentally about bacteria meeting a blocked gland, prevention comes down to keeping your eyelids clean and your glands flowing. Washing your hands before touching your face is the simplest and most effective step. If you wear eye makeup, remove it thoroughly every night with a gentle cleanser designed for the eye area. Replace cosmetics on schedule and never share them.

For people prone to recurrent styes, a daily eyelid hygiene routine can break the cycle. This means gently cleaning the lash line each morning with a warm washcloth or commercially available lid scrub pads, followed by a warm compress to keep the oil glands from thickening and clogging. Consistent lid hygiene is particularly important if you have blepharitis or meibomian gland dysfunction, since these conditions create the ongoing blockages that make repeated infections almost inevitable without daily maintenance.