Anaerobic glycolysis is the process of producing ATP in the absence of oxygen. It can take various forms and produce different types of waste products depending on the organism. For example when we go through a strenuous exercise and oxygen is not supplied fast enough for our muscles to produce ATP through oxidative phosphorylation, our muscles carry out anaerobic glycolysis and have glucose turn into pyruvate. Lactic acid will be the waste product in this case.
Fermentation reduces NADH to NAD+ and recycles the NAD+. ATP production during fermentation can only generate 2 ATP instead of 38 when oxidative phosphorylation takes place. Although only about 5% of ATP is generated, it takes place 100 times faster. Anaerobic respiration is a much more temporary solution and when the hydrogen ions build up in the cytoplasm and the environment becomes too acidic, then the enzymes for fermentation are inhibited.