Out of consideration for the delicate sensibilities of Maggie's readers, I have refrained from including a photo of advanced Toenail Fungus
These unpleasant, common, but generally not-dangerous fungal infections (except, for example, in diabetics or the immunosuppressed) are caused by several species of fungi which thrive in the moist, confined area of shoes. Those fungi are basically everywhere. You do not need to be a barefoot gym rat to pick them up, but most people probably pick them up around pools, gyms, locker rooms, and the like. If you never go anywhere, you probably won't pick these things up.
Put plainly, these are examples of your body trying to rot while still alive - but that applies to any bacterial infection too. Both are associated with the same several fungi, often with Athlete's Foot progressing to Toenail Fungus (aka Onchymycosis).
Athlete's Foot can be just a little itching, but it can get nasty sometimes. It is manageable or even curable with anti-fungal creams used diligently.
The Toenail Fungus infection is more of a problem, because topical treatments have trouble penetrating the nails to attack the infection in them and beneath them. They are not just cosmetically problematic but can be painful because of the distortion of the nails. Toenail infections are the bread and butter of Podiatric practices, partly because of their chronicity. People sometimes think they just have one or two toenails affected, but usually all of the nails have some of it.
Some people just decide to live with it and let a Podiatrist attack it when wanted, but what you want to do for treatment is to treat any Athlete's Foot and then decide to go for a topical nail treatment (sometimes effective, like Jublia Topical), Toenail removal (ouch but most effective) with oral treatment with Jublia, oral Jublia alone, or Laser treatment (of uncertain effectiveness, unfortunately). Jublia is very expensive.