There's two basic groups.
1) Soured wort beers, soured quickly over night using Lactobacillus bacteria that is naturally found on grain (or inoculated with an isolated culture or yoghurt) to produce lactic acid before fermentation.
Some traditional styles.
Berliner weisse.
Gose (salty and sour) .
Lichtenhainer (Smokey and sour).
All of the above are very defined regionally specific styles from Germany. Many modern craft brewery 'sour' beers are are often fruited or dry hopped versions of the above.
2) Soured beer, soured slowly over any months/years post fermentation by usually combinations of Brettanomyces, pediococcus, acetobacter or lactobacillus, to produce lactic acid and/or Acetic acid.
Lambic*, and related beers: Gueuze (fizzy lambic), Kreik (Cherry Gueuze), Faro (Sweetened Gueuze) etc. Brewed and fermented entirely with wild yeast and bacteria, first from being exposed to wild yeast in the air, and then from storage in barrels.
Flemish Ales, Flanders Reds and Flemish Oud Bruin (Old Brown) and British Stock Ales. Fermented with Saccharomyces, then stored in wooden vessels contaminated with wild yeast and bacteria. The Flemish beers tend to have a vinous, wine like quality that can to lean to a malt vinegary in flavour in more extreme version. British Stock Ales have a mild brettanomyces tartness.
Where it gets confusing is that Lambic is a protected designation and can only be named as such if brewed in Pajottenland region of Belgium by approved brewers. So there are numbers of British and American brewers making these types of beer, but not able to label them as such, opting for the broader description of sour. American sours can be very bretty, barnyardy in character.
From a homebrewing perspective, we don't have the large wooden vessels that have been home to microflora for decades, and rely on the multitude of mixed blend yeast products on offer.