Lifecycle of a star about the same size as the Sun
1. Hydrogen nuclei fuse together to make helium
2. Hydrogen begins to run out, outward force from fusion is less than inward force of gravity, causing star to collapse inwards
3. Collapse causes temperature to increase, helium nuclei fuse to create heavier elements
4. Star expands to form a red giant
5. Red giant stops fusing helium, star shrinks and forms a white dwarf
6. White dwarf gradually cools down and forms a black dwarf