Onychomycosis is a common fungal infection affecting the nails, primarily the toenails. It is caused by various types of fungi, including dermatophytes, non-dermatophyte molds, and yeasts. The condition leads to nail discoloration, thickening, and separation from the nail bed, which can result in discomfort and pain.