Breathing in and out
Inhalation and exhalation happen sequentially as Herman stated in the comments. 

Yes, your general understanding of inhalation is correct. After the air gets into the lungs, the oxygen is diffused into the capillaries covering the alveoli. The now oxygenated blood travels back to the heart to be circulated throughout the body. As this blood enters capillaries in other regions in the body, the oxygen diffuses out of them and into the surrounding cells. Carbon dioxide (CO2) produced by the cells as a waste product then diffuses into the blood vessels. The CO2-rich blood is then circulated back to the heart to be pumped back to the lungs. This blood flows into the capillaries surrounding the alveoli, and diffuses out. The exchange of carbon dioxide and oxygen occurs simultaneously. So, as oxygen is diffused from the lungs into the bloodstream, CO2 in the bloodstream is diffused out into the lungs. 

Here are diagrams to depict what is described above.