You put the trash (only organic materials ) in a container (see pictures ), then you wait till the bacteria eats "Digests" the trash. In this process a kind of "Biogas" called methane is produced. This gas is flammable and produce CO2, but it produce 50% more energy for the same CO2 production than gasoline so it doesn't pollute environment very much. After the biogas is produced, all you have to do is to to collect it in a hose and store it in a safe place because it explodes if touches air. So you have to store it in a place far from air, for this purpose you will make a reservoir filled with water (see pictures). Then another hose will transfer the biogas to the boiler in order to make electricity using steam engine or you can use biogas to cook, heat water and many other uses.
So, did you get involved now ? If your answer is "yes" then continue to step 2, if your answer is "no" then visit this site http://www.ruralcostarica.com/biogas-faqs.html to see that this machine is safe and used in larger scales or watch "Planet Mechanics" in the episode called "cow power" to be sure.