Rocephin works by targeting and eliminating bacteria in the body. It is used to treat various bacterial infections, including severe or life-threatening conditions like E. coli, pneumonia, and meningitis. Additionally, Rocephin is used as a preventive measure to avoid infections in patients undergoing certain types of surgery.