When you breathe in, or inhale, your diaphragm contracts or tightens and moves downward. This increases the space in your chest cavity, into which your lungs expand. The intercostal muscles between your ribs also help enlarge the chest cavity.
When you breathe out, or exhale, your diaphragm relaxes and moves upward into the chest cavity. The intercostal muscles between the ribs also relax to reduce the space in the chest cavity.