Antifungal medications are used to treat and prevent fungal infections. These infections can affect various parts of the body, including the skin, nails, respiratory system, and internal organs. Examples of common antifungal medications include fluconazole, itraconazole, ketoconazole, and amphotericin B.