When a star reaches the end of it's life it will usually start by heating up its layers which causes the gas inside the star to heat up and nuclear fusion will start. Over time the elements in side of the star will start to bond together and they will become heavier and heaver and once they become so heavy the star will blow up.
When a star similar to polaris starts to die it starts when all the hydrogen is used up then it contracts under the weight of gravity. The star layers will start to heat up and they will expand and the core will become hot and helium will start to fuse into carbon. When the helium runs out the core will start to cool. Then the star will start to eject materials into space then the core will cool into a white dwarf and then eventually into a black dwarf. This entire process will take a few billion years.