Metronidazole is the generic form of the brand name drug Flagyl, which is used to treat bacterial infections of the skin, vagina, stomach, joints, or respiratory tract. The drug is sometimes used with other medicines to treat stomach ulcers. Metronidazole is an antibiotic, which works by killing bacteria in your body.