when we inhale, the oxygen enters to our lungs and our diaphragm pulls downward which helping our lungs expand with air while, when we exhale the carbon dioxide exits and our diaphragm returns upward which forcing our lungs to expel the carbon dioxide.
I hope, my answer can help you. ;)