Here's how it works:
1. Interstellar Cloud: The initial stage is a vast, cold, and diffuse cloud of gas and dust. This cloud contains mostly hydrogen and helium, with trace amounts of heavier elements.
2. Gravitational Collapse: Due to the gravitational attraction between particles, the cloud begins to collapse under its own weight. As it contracts, the density increases, and the particles get closer together.
3. Heating: As the particles fall inward, they gain speed, and their kinetic energy increases. This kinetic energy is converted into heat, causing the core of the collapsing cloud to heat up.
4. Protostar Formation: The heated core eventually becomes hot and dense enough to be considered a protostar. The protostar is still surrounded by a disk of gas and dust, which it continues to accrete.
Therefore, the energy driving the evolution from an interstellar cloud to a protostar is the conversion of gravitational potential energy into heat as the cloud collapses. This process is known as gravitational collapse, and it's the fundamental mechanism for the formation of stars.
Note: While the protostar is still quite hot, it does not yet have a stable nuclear fusion core like a true star. The energy output of a protostar is primarily due to gravitational contraction, not nuclear fusion.