How the whole inhalation process work?

The diaphragm (muscle) contracts, causing an expansion of the intrapleural cavity (space between the pleura of the lungs), and the lungs expand.

When the lungs expand, it makes a partial vacuum (negative pressure) inside the lungs, which pulls air into them (from the nose/mouth, into the bronchii, through the alveoli, and into the lungs).

As air passes through the alveoli (which are tiny air sacs surrounded by capillaries), the oxygen in the air binds to the hemoglobin in red blood cells, turning it into oxyhemoglobin, and giving the blood its reddish color. This oxygen-rich blood is pumped back into the heart, and out to the rest of the body, where the oxygen can detach from hemoglobin to be used in oxidative phosphorylation (generating energy for cells).

Once the cells use the oxygen to generate energy (in the form of ATP, adenosine triphosphate), they form carbon dioxide.

This carbon dioxide is reattached to hemoglobin in red blood cells to form carboxyhemoglobin, which gives oxygen-poor blood a bluish color.

This blood is pumped back to the heart, and back through the alveoli in the lungs, where the carbon dioxide detaches, is breathed out of the body, and fresh oxygen can be breathed back in, starting over the entire process again.