Aerobic work uses oxygen to produce energy and supports sustained effort. Anaerobic work produces energy without sufficient oxygen for short, intense bursts, and it creates fatigue rapidly. Most sports draw on both, so most athletes train both.
The systems are not switches. All three contribute at all times, with the proportions shifting according to intensity and duration. A boxer uses anaerobic energy for exchanges and the aerobic system to recover between them and across rounds, which is why aerobic fitness matters even in sports that look purely explosive.
Aerobic capacity is developed with easy continuous work and longer intervals. Anaerobic capacity is developed with efforts of 20 seconds to two minutes at high intensity, with generous recovery, and it should be used sparingly because the fatigue cost is high.
The aerobic system clears the by-products of hard efforts and restores energy between them. An athlete with a weak base can produce one good effort and then fades. Building the base first makes anaerobic training more productive later.
Spend most of your conditioning time on easy aerobic work, add anaerobic sessions in the weeks approaching competition or when repeated high-intensity efforts are the specific demand, and keep them short and high quality. The energy systems are covered in detail in Exercise Physiology and Energy Systems.