Bacteria and fungi can only grow in water, not in the fuel itself. If a fuel tank is unused and resting for a longer time, the small water content in the fuel can separate at the bottom and provide a viable environment.
Usually, the fuel will be extracted at the lowest point of the tank, so that accumulated water will be removed whenever the engine runs and separated in the fuel filter.
So if you have a well-constructed tank, and run the engine and clean and drain the fuel filter regularly, you should be fine. It also helps to keep the tank full to prevent condensation from the air inside it.
If you cannot run the engine regularly, I think there are additives to prevent microbial growth.
Once you have significant contamination, you probably have to drain and clean the tank as well as the filter and fuel pipes.