Ofloxacin is a fluoroquinolone antibacterial agent that acts by inhibiting DNA gyrase and topoisomerase IV. These bacterial enzymes are essential for DNA replication and chromosome maintenance. Their inhibition interferes with bacterial growth and survival, resulting in bactericidal activity.