An interstellar dust cloud collapses under the force of gravity, the gravitational potential energy decreases, kinetic energy and temperature increase, until hydrogen nuclei fuse into helium at 10 million Kelvin, and radiation/gas pressure balances gravity