How the Universe is going to develop depends on the quantities of matter in contains.
Since the universe is expanding from the Big Bang , the Galaxies are drifting farther and farther away from each other.
The expansion is constantly slowed down by the concentrated matter of all stars. There are two possible theories concerning the end of the universe.
The infinite Universe.
If there is enough matter in the Universe, than expansion will be slowed down to the point where expansion stops and will be reserved into shrinking. All galaxies will collaps in a 'Big Crunch', something like the looking-glass image of the Big Bang.
However when the total matter in the Universe will not be massive enough, then it shall expand forever, until all the burnt-out shell of the galaxies form isolated islands in an infinite space-ocean.
The question is will the Universe expands forever, or will it collaps again?
Nobody is able to tell this with absolute certainty. If astronomers calculate the quantity of matter in all visible stars and galaxies, than this will be much too little to stop expansion.
However recent observations indicate billions of dwelling stars in between the Galaxies, much more stars than expected, actually we still have no idea of the total quanty of matter in the Universe.Also known is that Galaxies do contain large quantities of invisible matter (black holes). Nobody knows the nature of this dark matter, but possibly 90 to 99 percent of all matter is of this kind.
If this is true almost 100 percent of the matter is built-up of this dark matter, than it is very likely that the Universe will collaps again at a certain time.