Anaerobic digestion (AD) is a sustainable biological process that converts organic waste into renewable energy, primarily in the form of biogas and bioelectricity, offering effective solutions to global challenges such as waste management, energy insecurity, and environmental degradation. Operating in an oxygen-free environment, AD involves four sequential microbial stages: hydrolysis, acidogenesis, acetogenesis, and methanogenesis. Biogas typically contains methane and carbon dioxide, along with trace gases such as hydrogen sulfide and ammonia. AD is suitable for a wide range of feedstocks, including food waste, sewage sludge, livestock manure, and agricultural residues. The composition of these feedstocks significantly affects biogas yield and process efficiency, particularly in the case of lignocellulosic biomass, due to their recalcitrant nature. To improve digestibility and enhance gas production, various pretreatment methods, including mechanical, thermal, chemical, biological, plasma-based, and combined techniques, are employed. The generated biogas can be used directly for heating, upgraded to biomethane for use as transport fuel or grid injection, or applied in combined heat and power systems. This chapter explores the fundamentals of AD, including the mechanism, the impact of various operational parameters on biogas yield, and different feedstocks used for AD process.