Everything started in clouds of gas and dust which can be triggered to coalesce under gravitational attraction. As the condensation takes place, heat is evolved and light emitted. At high enough temperatures, hydrogen fusion to helium occurs in a chain reaction that releases enormous amounts of energy. That is the position of our middle aged sun. At the moment after 5 billion years, it is half way through part one of its life cycle, having used up half its hydrogen. It’s relatively stable as the gravitational attraction crushing it is balanced by the nuclear fusion which is pushing to blow it apart.
After all the hydrogen in the core has fused in another 5 billion years, the sun will turn into a red giant, swelling several thousands of times to gradually swallow the planets in its solar system including the earth. So there’s plenty of time to plan an escape to find another solar system. In any case the male Y-chromosome is said to have only another 200,00 years of viability so perhaps we won't be around to be bothered. At this point the red giant fuses helium to form carbon and oxygen, important building blocks for life on earth. They have cooler surface temperatures hence the red colour.
The final evolutionary star state is the white dwarf, where an inert mass of oxygen and carbon builds a kind of cinder at the centre. Sirius B, the smaller component of the Sirius binary star, is the nearest example at 8.6 light years away. It no longer has a fusion energy source so becomes very dense under gravitational attraction balanced only by electron repulsion pressure. There are mass limits however above which electron pressure fails to hold the white dwarf together and a supernova explosion occurs triggered perhaps by accruing material from a companion star. This occurs through rising temperature igniting carbon fusion to iron, triggering a runaway nuclear fusion that generates the heavier elements above iron and expels them into the solar system, helping to form new stars.
The planets of our solar system are but the debris left over from the formation of the sun; a kind of afterbirth and a far cry from the earth-centric doctrine of the medieval Catholic Church that Galileo was severely punished for challenging.
Novels by Alan Calder
The Glorious Twelfthhttps://museituppublishing.com/bookstore2/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=531&category_id=69&option=com_virtuemart&Itemid=1&vmcchk=1&Itemid=1
The Stuart Agenda published by Willowmoon www.amazon.co.uk/dp/B005BJ3GNIwww.amazon.com/dp/B005BJ3GNI