Predicting the future is a risky thing in science. But if we look at the long-term evolution of the Solar System, astronomers and planetary scientists have a reasonable idea of how it will pan out and end.
Based on statistical calculations, we can expect certain events to occur. Our sun, is a G-type star which is currently called the main sequence. This means that it incorporates hydrogen at its core and converts it into helium.
Quoted from IFL Science, at this time the age of the Sun is arguably middle age. It has been shining for about 5 billion years. What happened next to the Sun has been seen in many other stars.
Hotter, bigger, and redder
Over the next 5 billion years, the Sun will get hotter and hotter. The process will be slow, but will definitely affect the Solar System. The earth will certainly be affected in various ways.
An increase in temperature will cause an increase in silicate weathering, which will slow down the carbon cycle. This will impact many plants though not all. As for the remaining herbs, they won't last long. Eventually, there will be no more plants and the food chain will collapse. That could happen in about 600 million years.
In a billion years, the Sun will become 10% brighter, causing a runaway greenhouse effect that causes the evaporation of all the oceans. After that, within billions of years, plate tectonics and the entire carbon cycle will stop, and Earth will be like a new Venus.
The earth would be so hot that it could melt lead. And by far, the Sun is getting brighter. Scientists predict that soon the Sun will also get bigger.
When the Sun runs out of hydrogen to melt into its core, it will no longer be in equilibrium. The energy released by nuclear fusion balances the Sun's weight. Without fusion, the core would begin to contract, bringing new hydrogen into a shell-shaped region where the temperature and pressure were high enough to melt it.
This process has dramatic effects on stars like the Sun. Their outer layer expands dramatically. They later became the Red Giants. When it is the Sun's turn to experience this, it will be wide enough to expand into the orbits of Mercury and Venus, reaching near Earth.
Mercury disappeared
There's a small chance that the smallest planet might start a game of cosmic 'billiards' before the Sun decides to eat it up. In the last few billion years, eight canonical planets and thousands of smaller bodies in the Solar System have orbited the Sun.
There is a possibility that all of this could change in the next 5 billion years. And at the center of this orbital 'drama', there is Mercury. There is a 1% chance that the small planet can be pulled out of its current orbit before the Red Giant phase.
This leads to a series of scenarios, ranging from collisions with Venus and even Earth, to being launched into the Sun, or even being ejected out of the Solar System.
There is no one right solution to such a complex gravity problem. But different approaches to simulating future scenarios, with different assumptions about which major and minor players will play a role, have repeatedly shown that the stability of the Solar System is untenable.
End of the Solar System
Earth and Mars will most likely rotate towards the Sun, while the other planets will be pushed outward. The outer layers of the Sun were so loosened by the star's gravity that they began to be blown away, forming planetary nebulae. The Sun will lose mass and the gas giant will be in an orbit that gets wider, closer and closer to doubling its distance to the Sun.
The sun will eventually shed all of its layers and reveal a shrunken core, and become the new stellar object we call a white dwarf. Having lost most of its mass, the white dwarf Sun will not be able to sustain the remaining planets forever.
A star too close would be enough to disturb at least three of the four giants. The Solar System will probably just leave Jupiter behind. According to the simulation results, this kind of event will occur in 30 billion years, causing the disappearance of three planets in 10 billion years.
Simulations suggest that the last planet may last quite a while, but will eventually be pushed out through encounters with other stars.
Perhaps in the distant future, an astronomer from an alien world will look at the white dwarf that was once the Sun in our Solar System, and wonder if there was ever life illuminated by the light from that dead star.