Ants and all other insects have a set of branching tubes that run down from their exoskeleton down to almost the cellular level, through which air passes.
Ants take in air through holes in their exoskeleton. Air mixes with their loosely flowing blood (they do not have blood vessels--too small for efficiency) and reoxygenates it.
Ants like other insect do not have lungs and do not carry oxygen in their blood. Instead they have a trachea system, tubes with openings to the exoskeleton.
Ants have tiny holes on their body called spiracles. These spiracles are connected to long tubes in the ants body called tracheae, which allow oxygen to flow through their bodies.