Insects have tracheae which allow for gas exchange but also prevents water loss
The gases enter through the open spiracles along a concentration gradient
The tracheae move the oxygen to call cells which are closely associated with cells
The tracheae divide into small dead-end tubes called tracheoles. The tracheoles due to their size are able to distribute oxygen throughout the body
Air is drawn into the insect as oxygen is moved into the cells, so there is an indifference in the concentration gradient; so, oxygen is drawn into the tracheae system. Carbon dioxide leaves through the same method as there is a high concentration of carbon dioxide inside the insect and low on the outside.
The spiracles are able to open and close as they need to control water loss
The end of each tracheole is filled with water, as when the muscles anaerobically respire lactose which is soluble and lowers the water potential. Water therefore moves into the cell from the tracheoles through osmosis. The water is then reduced, so more air can be in the tracheae. The rate of reaction is much faster, however more water is being used.
The lower internal amount of oxygen inside the tracheae causes the spiracles to open to allow for oxygen to enter and the Carbon Dioxide to leave. The spiracles are not constantly open to reduce water loss. The Carbon dioxide being too great in the tracheae causes the spiracles to open.
Oxygen concentration within the insect caused by the aerobic respiration of each cells causes oxygen to move into each cell leaving a low concentration inside the insect, so therefore oxygen is drawn in. This same process allows for carbon dioxide to leave
The spiracles open to their full size but only for a short period of time to maximise oxygen intake and carbon dioxide outtake but minimise water loss.