When you are exercising.
In everyday life when you aren't doing physical activity, you get enough oxygen to move. However, when you are exercising, you're using more oxygen than how much you're taking in. When the body doesn't have enough oxygen, (when you are exercising) it switches to anaerobic respiration (or fermentation).
Hope this helps!