The first one is aerobic respiration, produces energy using oxygen.|
The second is anaerobic respiration, does not require oxygen to produce energy, but leads to the build up of lactic acid, that's why when you exercise for long periods of time your legs start to get sore because oxygen cant travel to the legs fast enough.