There is a lot of material online on Biogas which is easily accessible.
Just to get you started:-
Biogas can be produced from various organic material in the absence of oxygen through fermentation. This method of fermenting waste is known as Anaerobic Digestion/fermentation method. You would be needing a lot of storage tanks and slurry pits to put your input substrate.
Remember that We need to add water to get the solid concentation aspect taken care of too. Try searching for it. You would need a digester in which the fermentation takes place. The gas produced is Biogas with 50-70% methane, 20-30% CO2, H20 and traces of sulfuer which need to be removed as they are harmful for you engine. The gas from digesters is sent to gas storage tanks which act as a regulator that is they make sure that input gas is proportional to output gas. Then the gas is sent to the engine which can either be used as electricity or for what ever purpose you want. The remaining material from digester is dryed and can be used a a fertilizer if mixed with dung. Water is purified and filtered with the help of water treatment plant.
This is the basic gist. Search for it and you will find an answer.
Im also posting some links which might help you get started.
"Almost" Good Answers: