Insects require oxygen just as we do, and must "exhale" carbon dioxide, a waste product of cellular respiration. Oxygen is delivered to the cells directly through respiration, and not carried by blood as in vertebrates.
Along the sides of the thorax and abdomen, a row of small openings called spiracles (8) allow the intake of oxygen from the air. Most insects have one pair of spiracles per body segment. Small flaps or valves keep the spiracle closed until there is a need for oxygen uptake and carbon dioxide discharge. When the muscles controlling the valves relax, the valves open and the insect takes a breath.
Once entering through the spiracle, oxygen travels through the tracheal trunk (8), which divides into smaller tracheal tubes. The tubes continue to divide, creating a branching network that reaches each cell in the body. Carbon dioxide released from the cell follows the same pathway back to the spiracles and out of the body.
Most of the tracheal tubes are reinforced by taenidia, ridges that run spirally around the tubes to keep them from collapsing. In some areas, however, there are no taenidia, and the tube functions as an air sac capable of storing air.
In aquatic insects, the air sacs enable them to "hold their breath" while under water. They simply store air until they surface again. Insects in dry climates may also store air and keep their spiracles closed, to prevent water in their bodies from evaporating. Some insects forcefully blow air from the air sacs and out the spiracles when threatened, making a noise loud enough to startle a potential predator or curious person.