Cefotaxime is used to treat a wide variety of bacterial infections. It may also be used to prevent infection from certain surgeries. This medication belongs to a class of drugs known as cephalosporin antibiotics. It works by stopping the growth of bacteria.