Antifungals are medications that work by killing fungus or stopping it from replicating and spreading. Note, much like bacteria, your body does need some fungi, and killing all of it can cause other problems, such as an increased risk of bacterial infections.