This simple process works because of the lucky fact that bacteria that could be harmful to us can't tolerate much salt, but there are healthy bacteria (think yogurt) that can. I think of them as the bad guys vs. the good guys. Lacto-fermentation wipes out the bad guys in its first stage, then lets the good guys get to work during stage two.
The good guys on the salt-tolerant team are called Lactobacillus. Several different species within this genus are used to produce fermented foods.
The benefits of eating food with live, Lactobacillus bacteria include a healthier digestive system and speedy recovery from yeast infections. They are also supposed to have anti-inflammatory properties and be useful in preventing certain kinds of cancer.
In stage one of lacto-fermentation, vegetables are submerged in a brine that is salty enough to kill off harmful bacteria. The Lactobacillus good guys survive this stage and begin stage two.
In stage two of lacto-fermentation, the Lactobacillus organisms begin converting lactose and other sugars present in the food into lactic acid. This creates an acidic environment that safely preserves the vegetables - and gives lacto-fermented foods their classic tangy flavor.