Time and good care
Depending on how premature the baby, will determine how long until the lungs fully develop.
The little air sacs at the ends of the airtubes just take time to develop. They are very important, though, as this is where the gas exchange takes place in the lungs. In the meantime, baby might get doses of surfactant, a medicine that helps keep the lungs from sticking together. Try to be patient!