Stellar nucleosynthesis is the process that occurs in stars when protons and neutrons are combined together to create elements. The theory of stellar nucleosynthesis came mostly from the work of two scientists, Arthur Eddington and Fred Hoyle. hydrogen and helium are thought to have formed in the very early universe when high energy quark-gluon plasma lost enough energy that quarks, a type of matter particle, began bonding togethern to form protons. This is part of a process know as Big Bang nucleosynthesis.

In the areas where these particles were more dense than others big clouds of gas began to form as gravity took over and brought them together. Eventually as the clouds get bigger and bigger the mass creates a force that is large enough to fuse together the nuclei of the atomic elements. This process is called nuclear fusion. Through this process we have essentially created a two proton atom from two one proton atom or in other words created helium from hydrogen. This releases an immense amount of energy and is what actually cause the stars and the sun to burn as we see them. 

www.space.com

The creation of helium is only the first step though. A star takes about 10 million years to burn through all of the Helium it creates, however this also depends on the size of the star. Eventually things start to get hot enough in the star that fusion begins again but this time between two helium atoms creating carbon. This process continues forming more elements like Neon and Nitrogen, burning through that then creating oxygen, burning through that yet again to create silicon until finally the star burns down to the most tightly bound nucleus in nature which cannot burn to create anything else, iron. At this point the star is so hot and has nothing left to burn to create pressure and it collapses. At this point if the star has enough mass it will go supernova in a massive explosion.

 

www.meta-synthesis .com