In a star like the Sun, Hydrogen burns into Helium, with Deuterium being a step along the proton-proton chain. When All the Hydrogen in the core is used up, the core contracts, and gets extremely hot. The layers outside of the core also contract, and a shell of hydrogen around the non-burning helium core begins to burn. The helium produced here sinks to the core, adding heat and mass. The added mass causes further contraction, and eventually the helium core starts burning, turning into carbon via the triple-alpha process.
Eventually, the helium runs out, the core contracts again, a hydrogen shell starts burning, helium sinks to a shell around the carbon core, the hydrogen shell stops burning, contracts, another hydrogen shell starts burning, producing helium, which sinks to the helium layer, which eventually gets hot enough to start burning, producing carbon, which sinks to the carbon core, heating it up and causing it to contract from the added mass, which heats it up more, eventually getting hot enough for the Carbon-Nitrogen-Oxygen cycle to begin. This is what happens to a main-sequence star after it leaves the main sequence. Large stars do this in repeated steps and repeated layers, all the way up to iron, though when iron forms, disaster happens.
During this repeated process of shell burning, the star will repeatedly shrink and contract over the scale of a few million years, losing mass in the process. For a star the mass of our Sun, the process will stop at Oxygen (I think). At this point, (and, once the various shells stop burning), the last of the outer layers float off into space, the core contracts, and fusion stops.
This is a white dwarf. No fusion goes on - it's just a hot ball of degenerate gas (In the case of our Sun, a hot ball of mostly Oxygen). At this point, there isn't much in the way of gravitational contraction, glowing only from black body radiation.
Just for fun, there are certain masses where this recurring balancing act of shell-core-shell-core burning doesn't work, and the star blows up - for example, when helium burning begins but there isn't enough mass external to the core to exert an inward pressure on the core, the helium core can blow itself apart.