Welp, there are a few theories.
One is the pacman theory. You just go off one end and reappear on the other without knowing.
Another is the deceptive navigation theory where its not possible to go straight. Compasses, the sun, stars, radio waves ... all things will tell you that you are going straight but actually just get you walking around the perimeter. You can only ever get near the edge and start walking around it. To actually go straight would be counter-intuitive to all your senses and you would be met with impassable terrain anyway.
That last one might need a bit more illustration. What is East? Sounds easy. Isn't easy.
The definition of east is a cardinal point of the compass, 90° to the right of north.
https://www.dictionary.com/browse/eastThat isn't a straight line across a flat earth. It is a circle around a point in the middle of it. You travel East and you are going in a circle ... not a straight line. The straight line is South in all directions from North. But as you get close to the edge, East and South, as well as West and South will converge. You can't follow anything South because you are running out of South, so you'll end up going East or West instead.