eliminate all oxygen. flush with CO2 if you can, and/or top off the fermenter. Keep airlock filled. Make sure stopper is tight.
That's not going to help if it ALREADY tastes like vinegar.
To the OP, all vinegar out there is made from alcoholic beverages that acetobacter has been introduced into. Malt vinegar is made from beer (or a beer-like liquid made from malted grain). Cider vinegar is made from cider (or at least some form of fermented apple juice). Red wine vinegar and white wine vinegar are, obviously, made from wine. You'll even find more specific sub-categories such as sherry vinegar and champagne vinegar. Balsamic vinegar is usually made from red wine.
So, if you have something contaminated with acetobacter and the bacteria has access to oxygen, the bacteria will eat the alcohol and convert it into acetic acid, making it more and more vinegary and less and less alcoholic.
While there are good vinegars made from beer, usually they do it on purpose. Probably best to dump this one.
It is worth noting that some traditional Belgian sour beers have a small influence from acetobacter, but it's not enough to convert the beer into vinegar. Just to add a significant amount of acetic acid. If too much is added, that beer has to be dumped or blended (but probably dumped).