THE BIRTH OF THE SUN
A Globule of Gas:
The Sun, like other stars, was formed in a nebula, an interstellar cloud of dust and gas (mostly hydrogen). These stellar nurseries are abundant in the arms of spiral galaxies (like our galaxy, the Milky Way).
In the stellar nursery, dense parts of the clouds undergo gravitational collapse and compress to form a rotating gas globule.

The globule is cooled by emitting radio waves and infrared radiation. It is compressed by gravitational forces and also by shock waves of pressure from supernova or the hot gas released from nearby bright stars. These forces cause the roughly-spherical globule to collapse and rotate. The process of collapse takes from between 10,000 to 1,000,000 years.
A Central Core and a Protoplanetary Disk:
As the collapse proceeds, the temperature and pressure within the globule increases, as the atoms are in closer proximity. Also, the globule rotates faster and faster. This spinning action causes an increase in centrifugal forces (a radial force on spinning objects) that causes the globule to have a central core and a surrounding flattened disk of dust (called a protoplanetary disk or accretion disk). The central core becomes the star; the protoplanetary disk may eventually coalesce into orbiting planets, asteroids, etc.

Protostar:
The contracting cloud heats up due to friction and forms a glowing protostar; this stage lasts for roughly 50 million years. If there is enough material in the protostar, the gravitational collapse and the heating continue.
A Newborn Star:
When a temperature of about 27,000,000°F is reached, nuclear fusion begins at the core of the Sun. This is the nuclear reaction in which hydrogen atoms are converted to helium atoms plus energy. This energy (radiation) production prevents further contraction of the Sun.
Young stars often emit jets of intense radiation that heat the surrounding matter to the point at which it glows brightly. These narrowly-focused jets can be trillions of miles long and can travel at 500,000 miles per hour. These jets may be focused by the star's magnetic field.
Later, the Sun stabilizes and becomes a yellow dwarf, a main sequence star which will remain in this state for about 10 billion years. After that, the hydrogen fuel is depleted and the Sun begins to die.