How does a star change over its life cycle?
To quote Hemingway on 'How did you go bankrupt?':
'Two ways. Gradually, then suddenly.'
First we need to define the 'birth' of a star. Stars are created when giant molecular clouds starts collapsing into a small core (think a few thousand times the Solar System) .
If you recognize this picture, congrats! You've already seen a giant molecular cloud!
Anyways as the gas and dust collapses, it heats up partly due to friction but mostly due to transfer of gravitational energy into internal energy (there's a theorem called the Virial theorem that comes in play). Our definition of the 'birth' of a star is when it enters the main sequence, which is defined when the core of the star can undergo stable Hydrogen fusion, ie fusing
Once the star is in the main sequence, not much happens for a long time. How long? Well that depends on the type of star! More particular it depends only (or almost only) on the mass of the star. Masses of stars are typically written in Solar masses. So a 1
So what happens during the main sequence? Basically the star slowly burns its hydrogen into Helium. Depending on the mass, the star will have a turbulent core where the Helium will be fully mixed or a radiative core where the helium will settle at the centre (remember it's heavier than Hydrogen). The second case is what happens in the Sun.
Eventually the fuel runs out and then happens the sudden part. (Sudden by the standards of the Universe). A star less than 8 or so solar masses will start burning Helium which creates lots of heat and expands the outer atmosphere. Because the expanded atmosphere is now larger/further away from the core, it is cooler than before, making it red. It's red and it's giant. It's a red giant! This lasts a few (~1-10) million years. The stellar winds blow off the atmosphere making a really nice nebula and leave a white dwarf to cool down.
Stars more massive than 8 Solar Masses are big enough to burn Helium into Carbon, then C->Ne, Ne->O, O->Si and finally Si->Fe. Turns out you can't burn Fe and get energy out of it. You now have a massive star that used to support its weight through the pressure created by burning elements, but now this pressure suddenly disappears. In a matter of milliseconds. Imagine 10+ Suns crashing down on you. Yep, that's a supernova, an indisputable end to our star's life.
NB: The stages of Carbon, Neon and Oxygen fusion take shorter and shorter. Typically Neon fusion is only several years, Oxygen is several months and Si->Fe fusion takes only a day or so!
Massive stars look kind of like this (NOT TO SCALE) with heavier elements closer to the center (they're heavier so they sink). This is a star that only has a few days to live as it's already accumulated inert iron in its centre.