Fight Fire with Fire

What does the idiom “fight fire with fire” mean?

Definition: Use the same measures that are being used against you, even if they’re stronger than you would usually use

Example: Our competition is running ads accusing us of cheating on product testing. We’ll just have to fight fire with fire.