Nystatin is an antifungal medication used to treat fungal infections caused by Candida species. It is commonly used in neonates to manage oral thrush and diaper dermatitis. Nystatin works by binding to sterols in the fungal cell membrane, causing its disruption and subsequent cell death.