Sauerkraut is pickled cabbage. To produce it, cabbage is shredded, salted and then left to ferment in a de-oxygenated environment for 4-6 weeks. The salt, via osmosis, pulls the water out of the cabbage to form brine which helps protect the kraut while it is fermenting. Some modern recipes do use vinegar, but the traditional method just uses salt and occasionally water to add brine volume.
Earliest recordings of fermented vegetables come from Northeast China as long as more than four thousand years ago. It is said the Genghis Khan brought the art of lacto fermenting vegetables from central Asia to Western Russia when the Mongols were conquering.
Pliny the Elder wrote a couple lines describing the craft 2,000 years ago in Rome.