When a star exhausts all its energy and can no longer support itself, its core collapses, and the outer layer blasts. Scientists have said that our sun will face the same fate about five billion years from now.