In the absence of oxygen, a number of common soil bacteria species grow tiny nanowires, along which they push electrons to nearby rocks. This movement of the electrons produces energy, which the bacteria use to make ATP -- the molecule all cells use to power everything they do. However, this energy production strategy is rather unusual; outside of these species, most cells, including human cells, produce their energy using internal processes, not external ones.
This Bacterium Shoots Out Wires From Its Body To Power Itself
Source: Popular Science