How exactly will our Sun die (on an atomic level)?
Our sun is a star that burns nuclear fuel in its core and generates heat through the process of fusion. When a massive, dying star reaches a stage where it's burning fuel inefficiently or has exhausted all of its nuclear material, it enters what are called "Red Giant Stars" or "Brown Dwarfs". These stars have expanded to such an extent that they've consumed their entire supply of hydrogen at its cores, leaving no more left for further fusion reactions - which results in them fusing helium into carbon instead. As these stars continue on their journey towards eventual death, they cool down due to the emission of gravitational energy from the contraction of their outer layers as well as radiation pressure emitted by their expanding atmospheres.

The fate after this period depends greatly upon the exact mass of the star itself; if it was less than 2 solar masses, then it would enter a state known as the Wolf-Rayet phase before ultimately exploding with an iron peak supernova explosion. If it were over about 8 solar masses though, it could become a black hole surrounded only by a dense cusp of matter. However, there exist theories predicting the existence of even heavier brown dwarf stars up to 20 Jupiter masses, but nothing beyond.