A new star, or protostar, does not yet shine.
It is a loose mass of cold dust and gases.
Gravity forces the protostar to contract during its infancy, which lasts for millions of years.
A protostar trillions of miles wide will shrink to only millions of miles in diameter.
The motion of the shrinking protostar creates an enormous amount of pressure and heat. When the temperature of a protostar reaches 10 million°K, or about 18 million°F (10 million°C), it stops contracting.
The process of thermonuclear fusion begins, which produces the star’s energy.
The protostar has become a star and begins to shine.