Insects have small holes in their bodies that allow them to breathe. These holes are called spiracles. Air comes in the spiracles and goes to invertebrate trachea, or tubes.
These tubes take the oxygen to other parts of the insect body. Because insects have no lungs, air comes in and goes out of the spiracles passively (by itself). Some insects can open and close the spiracles to keep water out.