Stars are formed in nebulae, interstellar clouds of dust and gas (mostly hydrogen). These stellar nurseries are abundant in the arms of spiral galaxies.
In these stellar nurseries, dense parts of these 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.
If there is not enough material in the protostar, one possible outcome is a brown dwarf (a large, not-very-luminous celestial body having a mass between 1028 kg and 84 x 1028 kg).
A Newborn Star:
When a temperature of about 27,000,000°F is reached, nuclear fusion begins. 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 star.
Young stars emit jets of intense radiation that