A stye is a painful red bump that forms on the upper or lower eyelid near the eyelashes. Though painful, a stye is a relatively harmless inflammatory response to a bacterial infection.

Rarely, styes may spread if the bacteria that causes them is transmitted from one person to another through direct contact or from a contaminated towel or pillowcase.

Styes are often caused by Staphylococcus bacteria, which can be found in the nose without causing any complications. But, if you’re a carrier of the bacteria and you rub your nose and then your eye, the eye can become infected and a stye can form.

Styes are more common in children than in adults, though you can develop a stye at any age. You’re also at increased risk if you’ve had a stye before.

You’re also at risk of styes if you have blepharitis. Blepharitis is a chronic condition in which the eyelid is inflamed due to blockage of the oil glands near the base of the eyelashes.

Other conditions that may increase your risk for a stye include diabetes and rosacea. Rosacea is a condition that causes red patches on your skin.

If you come into contact with or share a towel or pillowcase with someone who has a stye, you may be at risk, but this is rare.

The most noticeable symptom of a stye is a lump, which is sometimes painful, that forms on the inside or outside of the eyelid. In some cases, a yellowish fluid may drain from the stye. A stye typically forms near one eye only.

You may notice redness or tenderness before the lump forms. Your eyelid may also be painful to the touch. Sometimes the entire eyelid swells.

You may feel like there’s something in your eye, like dust irritating your eye when you blink. The eye with the stye may also be watery and unusually sensitive to light.

If you have a stye, be sure to wash your hands any time you touch the area around it. That can help keep the infection from spreading.

If you’re unsure whether you or your child has a stye, see a doctor for an official diagnosis. You should also see a doctor if a stye doesn’t start to look better after a couple of days or seems to be getting worse.

A stye can usually be diagnosed from a visual exam and a review of your medical history. No special tests or screenings are needed to make a diagnosis.

Styes often fade away on their own without treatment.

You should avoid touching a stye as much as possible. Never try to pop a stye. It contains bacteria-filled pus, which can spread the infection into your eye and elsewhere.

Stye treatment usually involves some simple home remedies, such as using a warm compress or flushing your eye with saline.

If you touch a stye, be sure to wash your hands thoroughly. That can help prevent the spread of the infection.

The main preventive step you can take is to wash your hands frequently and keep your hands away from your eyes. Washing your face daily may also help you avoid blockage in the oil glands in your eyelids, which can lead to complications, including styes.

You may also want to avoid sharing towels and pillowcases with other people, and make sure you regularly wash these items. It’s also a good idea to avoid sharing makeup and to replace your makeup when it gets old. Bacteria can grow in cosmetics overtime.

If you wear contact lenses, clean them daily and replace them as directed by your eye doctor. Also make sure to wash your hands before removing or applying your contacts.

If you have blepharitis, which seldom disappears completely, it’s important to maintain eye hygiene every day to lower your risk of styes and other complications.

Finally, you should talk to your doctor if you get styes repeatedly. There may be preventive measures you can use, such as antibiotic eye ointment.