What is the difference between metronidazole and ofloxacin?

Completely different. These are two separate types of antibiotics. Ofloxacin is a fluorinated quinolone often used in treating urinary infections. Metronidazole is both an amoebicide and an antibiotic effective against obligate anaerobic bacteria. Different drugs, different uses.