How Do You Get a Fungal Infection? Causes & Risks

You get a fungal infection when fungal spores or organisms enter your body through your skin, lungs, or mucous membranes and your immune system can’t stop them from taking hold. Some fungi already live on your body and cause problems only when conditions shift in their favor. Others come from the environment, picked up from soil, surfaces, or the air you breathe. The specific route depends on the type of fungus involved.

The Four Main Ways Fungi Get In

Fungal infections start through one of four entry points. The most common is direct contact with your skin, where fungi land on damaged or consistently moist areas and begin growing. Athlete’s foot, jock itch, and ringworm all spread this way, often picked up from shared surfaces like gym floors, locker rooms, or contaminated towels.

The second route is inhalation. Fungal spores are microscopic and float in the air, especially when soil is disturbed by farming, construction, landscaping, or even walking through certain environments like caves. Three major soil fungi cause lung infections in the United States: one is concentrated in the Midwest and East, another in the Southwest, and a third in the Midwest and South, though recent data from Washington University School of Medicine show these ranges are expanding nationwide. You breathe in the spores without knowing it, and in most healthy people the immune system handles them. In others, they establish a lung infection.

The third route is through breaks in the skin. A cut, scrape, surgical wound, or even a splinter can introduce fungal organisms directly into deeper tissue. This is how certain tropical and subtropical fungi cause infections beneath the skin surface.

The fourth, and often overlooked, is ingestion. Contaminated food or water can introduce fungi into the gastrointestinal tract, though this is far less common than skin contact or inhalation.

Fungi That Already Live on Your Body

Not all fungal infections come from the outside. Yeast, particularly Candida species, naturally lives on your skin, in your mouth, in your gut, and in the vaginal tract. Under normal circumstances, bacteria that share these spaces keep yeast populations in check. When that balance is disrupted, yeast multiplies rapidly and causes infection.

Antibiotics are the most common disruptor. By killing off bacteria, they remove the competition that keeps fungi contained. Research has shown that antibiotic use impairs specific immune responses in the gut that normally fight fungal overgrowth, making the body doubly vulnerable: fewer competing bacteria and a weakened local immune defense. This is why vaginal yeast infections, oral thrush, and skin yeast infections frequently follow a course of antibiotics.

Why Some People Are More Vulnerable

Your immune system is the main barrier between breathing in a fungal spore and developing an actual infection. Anything that weakens immune function increases your risk substantially.

Corticosteroids are one of the strongest risk factors. A study of patients with inflammatory bowel disease found that corticosteroid use increased the risk of invasive fungal infection by more than five times compared to people not taking these drugs. That risk was more than double the increase seen with other immune-suppressing medications in the same study. People taking corticosteroids for asthma, autoimmune conditions, or after organ transplants face similar vulnerability.

HIV/AIDS, cancer treatments, and organ transplant medications all suppress the immune system enough to let inhaled fungal spores progress into serious infections. For healthy people, mold spores in the air typically cause nothing more than a stuffy nose, sore throat, or mild cough. For someone with a compromised immune system or chronic lung disease, those same spores can colonize the lungs and cause a dangerous infection.

Diabetes creates a different kind of vulnerability. High blood sugar promotes fungal growth directly, and fungi thrive in the warm, moist skin folds that people with poorly controlled diabetes are prone to. The CDC notes that fungal infections are more likely whenever blood sugar levels run high, making glucose control a meaningful part of prevention.

Warm, Moist Environments on Your Body

Fungi need warmth and moisture to grow. The places on your body that stay damp are the places most likely to develop a fungal infection: between your toes, in the groin area, under the breasts, in skin folds, and around the nails. Wearing tight, non-breathable clothing or shoes for long periods creates exactly the conditions fungi prefer. Sweating heavily during exercise and not drying off or changing clothes afterward compounds the risk.

Nails are particularly susceptible because once a fungus gets underneath the nail edge, the protected space underneath is warm, slightly moist, and hard to reach with topical treatments. Nail fungus often starts after the nail has been damaged or softened by prolonged water exposure.

Surfaces, Shared Spaces, and Person-to-Person Spread

Most serious internal fungal infections don’t spread from person to person. Fungi like Aspergillus and the soil-borne species that cause lung infections are picked up independently from the environment. Your coworker’s lung fungal infection is not contagious to you.

Skin fungi, however, are a different story. Ringworm, athlete’s foot, and similar infections spread readily through shared surfaces, direct skin contact, and contaminated objects. Walking barefoot in a public shower, sharing towels, or using unclean exercise equipment can all transfer fungal organisms to your skin.

One notable exception to the “serious fungi don’t spread between people” rule is Candida auris, an emerging fungus that the CDC considers an urgent threat. Unlike most fungi, C. auris spreads easily between patients in healthcare settings. It survives on surfaces for extended periods, including doorknobs, bedrails, and shared medical equipment. Many common disinfectants don’t kill it. Outbreaks often start when a single colonized patient transfers between facilities, contaminating surfaces along the way. Even patients who carry C. auris without symptoms can spread it to their environment.

Reducing Your Risk

Prevention depends on which type of exposure you’re most likely to encounter. For skin fungi, the basics matter: keep skin dry, change out of sweaty clothes promptly, wear breathable shoes, and use flip-flops in shared showers or pool areas. Dry thoroughly between your toes and in skin folds after bathing.

For environmental fungi, awareness of your surroundings helps. If you’re digging in soil, working on a construction site, or exploring caves in regions where soil fungi are common, exposure is hard to avoid entirely. People with weakened immune systems may want to wear a mask during these activities or avoid them when possible.

If you take antibiotics, be aware that the disruption to your body’s microbial balance can last well beyond the final dose. Probiotics and fermented foods may help restore bacterial populations, though evidence on their effectiveness for preventing post-antibiotic fungal infections specifically is still limited. The most practical step is to use antibiotics only when genuinely needed and for the shortest effective course.

For people with diabetes, keeping blood sugar within target range is one of the most effective ways to reduce fungal infections. For those on long-term corticosteroids or other immune-suppressing drugs, staying alert to early signs of infection, such as persistent cough, skin changes that don’t heal, or white patches in the mouth, allows for faster treatment before the infection becomes harder to manage.