Who rules a city?

What rank of noble could be expected to rule an entire city (and probably the lands surrounding it)?

A city will generally be the capital of a principality or larger realm. The ruler of that realm generally rules from and over the city, with the immediately surrounding lands as his personal domain.

So princes are usually the ruler of a City? Good to know.