A city-state (what the Greeks called a polis, which is where our word politics comes from) is like a very small country, with just one city in it. There are still some city-states in the world today, like Monaco or Luxembourg. But in antiquity and the Middle Ages, city-states were very common. Ciy-states might have any of a number of different forms of government.
The first city-states were probably in West Asia, where there were many city-states throughout the Bronze Age, sometimes unified under a leader like Sargon of Akkad, and sometimes not. Uruk is one example of these Sumerian city-states. These city-states were ruled by kings, with councils of noblemen for advisors, as we see in the Epic of Gilgamesh. There were city-states in early Japan. There may also have been city-states in India, and in Ecuador, Peru, and Brazil.
In North America, many people lived in city-states as well. Cherokee people, for instance, lived in many different city-states until after the European invasion, when they unified under one chief in the 1700s AD.
Greece, in the Bronze Age, also was organized into many small city-states. Homer’s Iliad lists them: Mycenae, Sparta, Pylos, Athens, Corinth, Thebes, Ithaca, and so on. These city-states also had kings.
At the beginning of the Iron Age, many different people made new city-states all around the Mediterranean Sea: the Etruscans, the Romans, the Greeks, and the Phoenicians. Oligarchies or democracies ruled most of these city-states.
But by about 300 BC, most of the city-states had been swallowed up into big empires. Empires were stronger and more peaceful than living in city-states. It was not until the High Middle Ages, about 1000 AD, that city-states appeared again in northern Italy and Spain.