In the colon, anaerobic microbes process energy mostly using fermentation. Fermentation underlies all metabolic processes and isn’t limited to the colon; as it is the most important anaerobic metabolism, fermentation occurs all over the body (both human bodies and otherwise). However, the colon has the most concentrated fermentative space in our holobionts.
So how does this fermentation happen? Let’s look at how ancient man made beer for a simple example of fermentation (though, unless you suffer from auto-brewery syndrome[i], the byproduct of fermentation in the gut is not alcohol). Ancient homebrew would have likely been made in a few basic steps and nicely demonstrate what goes on in the gut as microbes diversify to best colonize this new environment which often begins by eating all the available food.
1) Ancient man would have put a relatively hard to digest material like unprocessed wheat seeds and some water in air-tight container—in a crapshoot, he would have relied on microbes already present in the fermenting vessel and on the wheat and hoped that they would be the ones that would yield drinkable beer (all anaerobic microbes can ferment; however, some produce some nasty smelling and disgusting by-products).
2) The aerobic microbes would make a mad dash through the nutrients in the wheat seed, using oxygen as the energy source to grab and process it while all the while replicating. After the oxygen gets used up, these microbes would die or fall into a state of suspended animation.
And 3) the lack of oxygen and all these nutrient-rich, dead microbes would have created an environment for the anaerobic microbes to take over and collect the left-over energy, fermenting the mixture. Similar things happen on our teeth: fermentation occurs but instead of the byproducts being a pleasant malty taste and buzz, we end up with smelly gasses and bad breath (Leeuwenhoek would have loved that). The same general, fermentative processes also happen in our guts (though with greater biogeography to host niches as well as testy locals always checking to make sure that an enterprising microbe is on the up and up). As food moves from stomach to the small intestine and particularly the colon, the amount of oxygen decreases. This oxygen gradient forms different microbial habitats and helps produce a level of diversification in skills: oxygen and oxygen-less zones.