@lvjiegufen,
Vinegar is formed when the vinegar bacillus, usually carried by a fly, infects something being brewed be it beer, wine or cider.
It’s a constant hazard for brewers. Vinegar manufacturers do it deliberately and they normally use a malt brew.
Cider vinegar is cider that’s been infected and the cider turned to vinegar.