How does a bio-gas generator works?

Can you answer this question?