What does borough mean?
Does the word have a different meaning when used in the five boroughs of New York City?
In the US, a "borough" is a unit of government within a state. It's kind of like a town, but in the US, a town has a specific form of government that differs a bit from that of a borough, although the exact meaning differs from state to state.
In reference to New York City, a borough refers to a semi-autonomous government unit within the city. Prior to 1898, "New York City" basically referred only to what is now called Manhattan. Brooklyn was a separate city, Queens was a county composed of smaller villages, etc. These areas joined together to form what we now know as New York City in 1898. Each borough is basically a county unto itself.
To me as a Londoner, a borough simply refers to a district with the larger city that has some degree of administrative independence. I believe the usage is fairly similar elsewhere, in New York for example.
Wiktionary gives the following definitions for borough:
The first definition, although not really in use any more, is perhaps the most interesting, in that it reflects the original meaning of the word in all Germanic languages - a fortified town/city. The word "borough" indeed derives from the Old English "burh", and is state to be "Cognate with Dutch burg, German Burg, Swedish borg, Persian bur."