A fungal nail infection, also known as onychomycosis, is a common condition that affects the toenails or fingernails. It is caused by a group of fungi called dermatophytes, although other types of fungi such as yeasts and molds can also be responsible. The infection leads to discoloration, thickening, and brittle nails, which can become painful over time.