The breathing movements are possible due to contraction and relaxation of the diaphragm. The rib muscles also help in these movements. When the ribs rise and diaphragm is lowered at the same time, then there is a decrease in pressure on lungs.
This causes movement of air into the lungs at the time of inhalation. On the other hand, when ribs come back to their normal position and diaphragm is risen, then pressure on the lungs increases. This causes movement of the air out of the body through the nose in the form of exhalation. These movements are possible only due to consecutive upward and downward movement of the diaphragm.