When you watch the animation, notice that the movement of air in or out begins with the contraction or relaxation of the diaphragm, which in turn changes the size of the chest cavity. Think about how this results in an increase or decrease of pressure in the chest cavity compared to the surrounding atmosphere outside the body, which leads to the movement or air into or out of the lungs.