What happens when the sun becomes a Black Dwarf? When will this take place in the future?
A black dwarf is a star similar in mass to our Sun that has spent all its fuel and it's now dark and cold. It's the end of a complex process that may take a trillion years to run its course.
That complex process begins when the Sun burns out all the hydrogen in its core (about 5 billion years from now). As that nuclear fusion reaction falters the core collapses under the Sun's gravity, until it becomes hot and dense enough to fuse helium forming mostly carbon and oxygen.
The energy burst from that reaction drives the outer layers of gas outward, making those gases cool and diffuse enough to glow red instead of white. The Sun has become a red giant that will swallow the Earth (which would long since have become lifeless anyway).
In time, the outer gases drift off and we are left with the collapsed core, so dense a cubic centimeter would have tons (not grams) of mass. This core, called a white dwarf, is left to run out of fuel for good and gradually cool off, ultimately becoming black -- a process that could take a trillion years because the white dwarf is so dense and has little surface area to cool off a lot of mass.