How does a newborn infant get a pneumothorax and what's the difference between that an a tension pneumo?

Colapsed Lung. A pneumothorax occurs when air gets in the the space between the chest wall and the lung. This space should not contain anything. So when air gets in, the lungs have to become smaller. A tension-pneumothorax is when the contents of the chest (heart, lung, collapsed lung) all shift to one side. Typically this is life threatening because blood cannot flow well. We don't always know why this is.
Many things. Inhaling fetal stool, high-pressure ventilation, respiratory distress, and other things can cause the pneumothorax. Determining which it is, depends on the history and chest x-ray. Also, a tension pneumothorax is when air keeps getting into the space outside the lung, but can't get out. Eventually, the heart, other lung, blood vessels, etc get squeezed by the tension, causing serious problems.