Vancomycin is used to treat colitis (inflammation of the intestine caused by certain bacteria) that may occur after antibiotic treatment. Vancomycin is in a class of medications called glycopeptide antibiotics. It works by killling bacteria in the intestines. Vancomycin will not kill bacteria or treat infections in any other part of the body when taken by mouth.