No-one knows exactly how the universe will end. There are several possibilities. One is that everything will fall into black holes, which will then fall into each other and coalesce until every particle in the universe is in one place just as they are thought to have been at the beginning.
A second possibility is that the expansion of the universe will accelerate faster and faster until all the fundamental particles are ripped apart from each other at speeds exceeding the speed of light so that they can never affect each other again and every little particle effectively ends up alone and impotent in its own universe, allowing nothing more complicated to exist.
A third possibility is that the universe is completely balanced between those two extremes, Goldilocks-style, and will continue to expand but at a decreasing rate so that it would theoretically stop expanding at all, but infinitely far in the future. In this case life within the universe can theoretically go on as normal for a very long time. However, eventually all the stars run out of fuel. The smaller ones evolve into white dwarves, then cool to brown dwarves and black dwarves. The larger ones evolve into black holes and neutron stars. Eventually all the protons in the black dwarves decay into positrons and gamma rays and the black holes evaporate via Hawking radiation until only the neutron stars are left. Much later, the neutron stars quantum tunnel into black holes which then themselves evaporate relativity rapidly. At this point the universe is just a homogeneous sea of electrons, positrons and photons. The electrons and positrons will eventually annihilate leaving only photons. From then on, nothing really changes.
But here's the weird part. We have a universe, empty apart from some weak radio waves, for an infinite period of time. Now, quantum-mechanically it is possible for empty space to just create a small piece of matter and a small piece of antimatter spontaneously, from nothing. In fact, this is happening all the time but normally these annihilate again in a very short time. It's very unlikely, but sometimes these particles will stay around a little bit longer. In some cases they may even be around for long enough to be joined by other fluctuation-generated particles. Very rarely you'll get a whole bunch of such particles together at once. Even more rarely still there will be enough of these particles to form an entire planet or solar system or stellar cluster or galaxy or galactic cluster or even a pile of matter the size of the currently observable universe. These things are all incredibly unlikely but given an infinite amount of time even the most unlikely things will eventually happen so long as they are possible.
So eventually, every sequence of events that has ever been played out will play out again just by random chance. And every possible sequence of events involving a finite amount of matter (including your life, and mine, and all conceivable variations thereupon) will play out just by random chance, an infinite number of times.
When I explained this to my friends, they said "wait a minute, so you believe that (given the universe is flat, the third possibility), at some point in the future the following sequence of events will happen:
- a perfect replica of the Earth as we know it will spontaneously form from nothing
- all of the salt dissolved in all of the water in all of the oceans of this replica world will spontaneously leap out of the oceans, hundreds of feet into the air
- this salt will then spontaneously form itself into a giant peanut orbiting the planet
- the peanut will spontaneously turn into a small green shining baby and
- all of this will happen an infinite number of times?
I had to confess that while phrased like that it did seem rather ridiculous, that it what the theory predicted. Some of my friends are rather strange people.