What kind of lung problems can result from open heart surgery?

Early and late. Early complications can be as minor as a little "shrinkage" f the lung from the anesthesia, and your doc will give you an "incentive spirometer" to encourage you to breath. Still, some people get pneumonia, and this is more serious. During or shortly after surgery, you can get fluid backed up into your lung. Late complications include blood clots, and pleural reactions (fluid around the lung).
Reversible. Common issues are collections of fluid under the lungs, especially the left lung (effusion), mucous plugging, bronchospasm, atelectasis (collapse of alveoli - small air units), and pneumonia. An uncommon complication is pulmonary embolism (blood clot). - all are reversible. Rarely, the phrenic nerve is injured with paralysis of the diaphragm on one side. That's usually permanent.