Mammalian lungs
The lungs of mammals have a spongy texture and are honeycombed with epithelium having a much larger surface area in total than the outer surface area of the lung itself. The lungs of humans are typical of this type of lung.
The lungs are located inside the thoracic cavity, protected by the bony structure of the rib cage and enclosed by a double-walled sac called pleura. The inner layer of the sac adheres tightly to the outside of the lungs and the outer layer is attached to the wall of the chest cavity. The two layers are separated by a thin space called the pleural cavity that is filled with pleural fluid; this allows the inner and outer layers to slide over each other, and prevents them from being separated easily.
Breathing is largely driven by the diaphragm below, a muscle that by contracting expands the cavity in which the lung is enclosed. The rib cage itself is also able to expand and contract to some degree.
As a result, air is sucked into and pushed out of the lungs through the trachea and the bronchial tubes or bronchi; these branch out and end in alveoli which are tiny sacs surrounded by capillaries filled with blood. Here oxygen from the air diffuses into the blood, where it is carried by hemoglobin.
The deoxygenated blood from the heart reaches the lungs via the pulmonary artery and, after having been oxygenated, returns via the pulmonary veins.
Human lungs