Discourage bad answers by downvoting them. Don't wait until they have an upvote left by someone else, as this is a net gain for the answerer and will only encourage them further. And if the answer is truly bad, it should not be getting upvotes!
You should also comment to explain _why_ the answer is bad. For instance, explain what details from the question they missed, or any other significant problem with the answer.
Wrong answers normally _should not_ be flagged for moderator attention, as it's also possible to learn (e.g. what not to do) from wrong answers. The big exception is if they are harmful or malicious. For instance, if someone posts an obfuscated command that would result in data loss if someone ran it, that would be something we would want to nuke on sight (and this _has_ happened).
If your question is getting a lot of bad answers, though, it's a strong indication that the question itself is the problem, and should be edited to clarify and improve it.