The yeast Candida albicans is part of the healthy, natural community of microbes that live on and in the human body. But when it has a population explosion, a woman’s got trouble. Three out of four women will get at least one yeast infection in their lifetime; half will get two or more, according to the U.S. Department of Health and Human Services.

Yeast infections are itchy. Really itchy. But before you rush out to buy an over-the-counter antifungal cream, know this: As many as two-thirds of women who use them actually don’t have a yeast infection, according to a Medical College of Georgia study of 95 women. Your problem could be a bacterial infection or even a sexually transmitted disease.

Learn more about what causes yeast infections, how to recognize them and when it’s OK to treat them yourself.

Related: 10 Health Symptoms Women Should Never Ignore

Causes

Yeast thrives on hormone shifts, stress and sugar. Your risk may rise if your immune system’s been weakened a little due to stress in your life, skimping on sleep or illness. Yeast love sugar and can thrive if you have poorly controlled diabetes or even if you’re grabbing tons of high-sugar snacks. And anything that alters your normal hormone levels, such as pregnancy, your menstrual period or the use of birth control pills or steroids, can create the right conditions for a yeast infection.

Related: Should You Say Sayonara to Sugar?

So can taking antibiotics, which may wipe out beneficial bacteria that help keep yeast in check.The National Institutes of Health recently launched a study in women ages 18 to 40 looking at how antibiotic use changes levels of bacteria in and around the vagina and how that may encourage yeast growth.

Symptoms

The major symptom of a yeast infection is extreme itchiness in and around your vagina. You may also have burning, redness and swelling of the vagina and vulva; a thick white discharge that looks like cottage cheese but doesn’t have an unpleasant odor; a rash; pain during sex or while urinating; and vaginal soreness.

Call your doctor if you’ve never had a yeast infection before or if you’re just not sure that’s what you have this time. A pelvic exam and a microscope or lab check of a sample of the discharge will reveal whether yeast is the culprit. If it is, your doctor may recommend an OTC anti-fungal product or, if your infection is severe, prescribe a one-dose anti-fungal pill.

When it’s OK to self-treat

If you’ve had yeast infections in the past and feel confident your symptoms are the same, experts say it’s OK to self-treat with a drugstore antifungal. Follow the directions and don’t stop early if your symptoms improve in a few days; you need the full course for best results.

If your infection doesn’t respond or if you’ve had four or more infections in the past year, contact your doctor. You may have another type of infection or an infection caused by a different strain of yeast.

Don’t just keep treating yourself on your own. In a Temple University study of 105 women who thought they had chronic yeast infections, 15 percent simply had irritated skin around their vagina from the anti-yeast products they were using over and over again. Treatment for recurring yeast infections includes longer courses of anti-fungal medications under a doctor’s supervision, according to the American Academy of Family Physicians. Your doctor may also check to see if a weakened immune system or undiagnosed (or uncontrolled) diabetes could be fueling repeat bouts. Learn more about hidden diabetes risks here.

An ounce of prevention

You can lower your risk for future yeast infections. Keep the skin around your vagina clean and dry; avoid soaps, douches, powders, perfumes and feminine hygiene sprays “down there.” These can irritate skin and even take away healthy bacteria that keep yeast in check. Stay dry, too. Change out of damp work-out clothes and bathing suits right away. Wear cotton underwear and cotton-crotch hose; synthetics and silk can increase sweating.

Related: 8 Fashion Mistakes That Could Wreck Your Health

If you have to take an antibiotic, eat yogurt with live active cultures or take a probiotic supplement containing Lactobacillus acidophilus to help cut your yeast infection risk. If you have diabetes, keep you blood sugar well controlled.

If you have an infection

Ask your partner to wear a condom, or refrain from having sex until your infection clears up. Research shows that the partners of women with chronic infections often harbor yeast, too. And some types of sexual activity can pass it around.

Related: 5 Tasty Ways to Eat More Yogurt

Sari Harrar is an award-winning health, medicine and science journalist whose work appears in Dr. Oz The Good Life magazine, Good Housekeeping, O--Oprah Magazine, Organic Gardening and other publications.