This may vary from species that can grow only in the presence of oxygen to those that can grow only in the absence of oxygen. The strict or obligate aerobes must have oxygen to metabolize. The strict or obligate anaerobes must reside in oxygen-free environments in order to survive. Their metabolism does not use molecular oxygen and they cannot protect themselves from the toxic byproducts that oxygen forms within the cell. Thus in the presence of even trace amounts of oxygen these cells will die.
Facultative anaerobes can grow in either the presence or absence of oxygen.
They have two forms of metabolism, one is aerobic and the other is anaerobic. They use oxygen if it is available and switch to the anaerobic pathways if it is not. Aerotolerant anaerobes are indifferent to the presence of oxygen. They only have anaerobic metabolism, but can remove the toxic byproducts of oxygen. Thus these anaerobes can survive in oxygen even though they don't use it for energy production.