It's primarily used to treat athlete's foot and onychomycosis (toenail fungus). Athlete's foot, aka tinea pedis, is a fungal skin infection that typically starts between the toes. It causes a scaly, itchy rash that may be painful… ... Viruses, bacteria, fungi, and parasites can all cause skin infections.