The temperature rises and becomes concentrated and forms a protostar (baby star)
Fusion occurs, hydrogen fuses to form helium and the star is much hotter and brighter. This is called main sequence
After main sequence for smaller stars, hydrogen runs out and helium nuclei are fused, which releases more energy. This expands to form a redgiant. When it stops fusing helium, a white dwarf is formed and cools, turning brown and then black.
After main sequence for larger stars, hydrogen runs out and other elements are fused. The star becomes a red supergiant. Once the star stops carrying out nuclear fusion, the star explodes, called a supernova.
The heaviest element that can be made in fusion in stars is iron. When a supernova occurs, the temperature is high enough to produce elements heavier than iron.
After a supernova, the remains of the star can form one of two objects. The first is called a neutron star. It consists of neutrons densely packed together. The second is called a blackhole. This has so much gravity that not even light can escape.