Nystatin is an antifungal medication commonly used to treat fungal infections, particularly those caused by Candida species. It is often prescribed for infections of the skin, mouth, esophagus, and gastrointestinal tract. Nystatin works by binding to sterols in the fungal cell membrane, leading to increased membrane permeability and cell death.