The people who thought the Earth was flat believed so because they did not know about gravity, and assumed that the flatness was the reason they did not fall off the planet. There is disagreement among historians concerning when civilizations began to view the Earth as round.
It is a myth that people thought the planet was flat when Christopher Columbus set sail. By this point, it was known that the Earth was a sphere, and the debate then was about actually how large the Earth actually was.
The Ancient Greeks knew that the Earth was a globe approximately 2,000 years before the time of Columbus. They discovered this by observing ships as they sailed away and taking note of the Earth's shadow during lunar eclipses.