Eratosthenes measured the circumference of the earth by measuring the distance between two cities and the relative angle between them, and, assuming the earth to be a sphere (a circle in 2-D), he calculated the circumference of Earth. More specifically, he had someone measure the distance between Alexandria and Syene. He knew that on the summer solstice the sun is directly overhead in Syene (since sun shone right to the bottom of a water well). He also measured the angle the sun's rays made with a tower in Alexandria, giving him a measure of these angle between these two cities. Knowing the distance between two cities and the angle sun's rays made between them, he measured the earth's circumference.
This is exactly same as measuring the circumference of a pizza by measuring the arc length of a pizza pie and the angle it makes at the center (central angle). Knowing the central angle (say a), we can determine what part of the pizza is contributed by the pie (= 360/a). Since we know the arc length of pie, we can figure out how many pies will make up the entire pizza and hence calculate its circumference.
Hope this helps.