Ants, like other land-based animals, derive their oxygen from air and will drown after a certain period when submerged in water. Some species such as the fire ant, however, have adaptations that allow them to form living rafts after evacuating their nests, drastically increasing their survivability during floods.
The respiratory system of ants and other insects is composed of tiny openings along the exoskeleton called spiracles. These holes allow oxygen to enter the trachea, where it is then delivered directly to the insect's tissues. Each individual spiracle is controlled by muscles and can be opened or closed depending upon the needs of the insect.