Natamycin is an antifungal medication used to treat fungal infections of the eye. It works by binding to ergosterol, a key component of fungal cell walls, causing leakage and ultimately killing the fungal cells. Natamycin is effective against yeasts and molds, helping to clear eye infections and protect vision.