When you breath in, the intercostal muscles and diaphragm contract. This causes the diaphragm to flatten and the ribs to move apart which increases the size of the chest cavity. The larger volume now means there is less pressure in the chest cavity. This pressure will be less than atmospheric pressure so air will be drawn into the lungs. When you breath out, the intercostal muscles and diaphragm relax. The diaphragm will return to its domed position and the ribs will relax closer together which reduces the size of the chest cavity. The reduced volume will increase the pressure in the chest cavity. The pressure inside the chest is now greater than the atmospheric pressure therefore air will be forced out of the lungs.Oxygen from the air will diffuse across the alveoli into the bloodstream and carbon dioxide from the bloodstream will diffuse out of the bloodstream into the lungs to be breathed out.