In the presence of oxygen, cells undergo aerobic respiration, leading to complete breakdown of glucose into CO2 and H2O, producing maximum ATP. In oxygen absence, cells switch to anaerobic respiration, leading to partial breakdown of glucose, resulting in less ATP and byproducts like lactic acid and ethanol.