The general rule behind all modifier questions (and modifier errors) is that modifiers need to be close to what they modify.
In the sentence
Geva, the teacher, wrote a letter to John Paul the 17th, the pope
There is no real reason to suppose that the pope modifies Geva, and not John Paul the 17th - proximity tells us that Geva is the teacher, and John Paul is the pope.
Thus, the modifying clause beginning with "the town" modifies the noun/name immediately preceding it, i.e. Corleone.
This particular modifier falls under the definition of "apositive" - where the part following the comma is merely a different way of describing the noun, and could technically replace it in the sentence. Instead of Corleone, we can write "the town".