Here's some info from Wikipedia. Eratosthenes knew that on the summer solstice at local noon in the town of Syene on the Tropic of Cancer, the Sun would appear at the zenith, directly overhead.
He also knew, from measurement, that in his hometown of Alexandria, the angle of elevation of the Sun would be 7° south of the zenith at the same time. Assuming that Alexandria was due north of Syene he concluded that the distance from Alexandria to Syene must be 7/360 of the total circumference of the Earth. The distance between the cities was known from caravan travellings to be about 5000 stadia: approximately 800 km. He established a final value of 700 stadia per degree, which implies a circumference of 252,000 stadia. The exact size of the stadion he used is no longer known (the common Attic stadion was about 185 m), but it is generally believed that Eratosthenes' value corresponds to 39,690 km.
Although his method was correct, some of his assumptions and measurements were not. Syene is not exactly on the Tropic of Cancer but rather slightly north of it, and is not directly south of Alexandria; nor is the Sun at infinite distance. (Eratosthenes knew the latter, but we are not told he corrected for it.) More seriously, angles in antiquity could be measured only to degrees or quarter-degrees, and measurement of overland distances was worse. The circumference of the Earth around the poles is now measured at around 40,008 km.
Eratosthenes' method was used by Posidonius about 150 years later.
About 200 BC Eratosthenes is thought to have coined or to have adopted the word geography, the descriptive study of the Earth.http://en.wikipedia.org/wiki/Eratosthenes