How do we know the universe is flat? Discovering the topology of the universe

Whenever we talk about the expanding universe, everyone wants to know how this is going to end. Sure, they say, the fact that most of the galaxies we can see are speeding away from us in all directions is really interesting. Sure, they say, the Big Bang makes sense, in that everything was closer together billions of years ago.