What does “finite but unbounded universe” mean?

In Einstein's book about relativity, he says that his theory predicts that the shape of the universe would be finite but unbounded.

But how is this possible?

What's the difference between an infinite and an unbounded universe?

Therefore, what does it mean for a universe to be "finite but unbounded"?

I will use 2D surfaces embedded in a 3D space for this answer, because we are accustomed to imagining such surfaces in everyday life. Just remember that in General Relativity, the 'surface' we are talking about is in fact 4D space-time!

As an example of a bounded Universe, imagine a 2D disc in 3D space. Now imagine that you are confined to one side of that disc, so you are in fact confined to a 2D space.

If you walk without turning for long enough on that disc, you will eventually reach its edge. That is, since the disc has a finite surface area rather than an infinite surface area, you cannot walk for an infinitely-long time without 'falling off'.

As an example of an unbounded Universe, imagine a sphere in 3D space. Now imagine that you are confined to the surface of that sphere, so you are in fact confined to a 2D space.

You may walk around that sphere as much as you like, and never come to an edge, despite the fact that the surface of the sphere has a finite area. That is, if you walk for an infinitely long time without turning, you will keep coming back to where you started, rather than walking away to infinity.

This is also true of many other 2D surfaces, such as the surfaces of torii.

Extending the idea to 4D spacetime in an intuitive way is difficult, but one could think of a finite, unbounded Universe as one in which, if you travel long enough in the same direction in spacetime, you come back to where you began, rather than reaching the 'edge of the Universe'.