How does a city-state operate?
Every city-state chooses what type of government they want.
Athens had a democracy, Sparta had an oligarchy, and the others got to choose for themselves. The city is like the capital, and the surrounding areas that they have is the rest of the state. They are all in the same country, but there are no national leaders. It is a very non-federal government.