Let’s look at a white dwarf first. These stellar remnants are the remains of Sun-like stars and are made mostly of carbon and oxygen. A white dwarf’s outer shell is so hot that it will radiate visible light for about 1010 — that’s 1 followed by 10 zeros — years. By then, the atoms will have cooled down enough that they crystallize into a giant diamond. However, this diamond does not last forever. As time marches on for another 1038 years, the protons and neutrons inside all the atoms will disintegrate and produce scant traces of light. First, all the atoms will break down into hydrogen. Then these hydrogen atoms will slowly disappear through a hypothetical process known as proton decay.
To understand how long that would take, imagine if you were to count every person on Earth (about 8 billion) at a rate of one per year. By the time you finished, the white dwarf would no longer shine. Then, if you were to count every atom in every person on Earth — there are about 1028 atoms in a human body — at a rate of one atom per year, the star will have virtually disintegrated by the time you were done.
A neutron star is the remnant of a massive star that has run out of fuel, exploded, and collapsed into a superdense star. Like a white dwarf, a neutron star will cool over about 1010 years to a point where it no longer emits visible light. However, unlike white dwarfs, neutron stars have a thin crust surrounding densely packed neutrons. Over the next 1038 years, scientists believe the crust will disintegrate thanks to proton decay. Eventually the gravitational force drops and the star expands into something reminiscent of a white dwarf (which now only has another 1038 years to live).
Finally, a brown dwarf is barely visible to begin with. It doesn’t fuse hydrogen in its core, meaning it’s not a true star. It might fuse deuterium, or heavy hydrogen, but that fusion will stop after a mere 108 years. Then it too will slowly succumb to proton decay over 1038 years.
It’s a very bleak future, but there is plenty of time until then!