There are no city-states left in Greece today. But long ago, there were hundreds of city-states in ancient Greece, some really small ones and some really big ones with large populations.
Each ancient Greek city-state had its own form of government and its own army, and even sometimes its own navy. Each city-state certainly its own way of doing things. Still, the city-states of ancient Greece had many things in common. They all spoke the same language; they all believed in the same gods; they all worshiped in the same way; they all thought of themselves as Greeks. But they were loyal to their city-state.
If you asked someone in ancient Greece where they were from, they would not say they were from Greece, because Greece at that time was not a country. It was a collection of city-states, each with its own personality and way of doing things. They would say they were from Athens, or Sparta, or Corinth, or Argos. The Greeks were very proud of their own city-state.
The city-states banded together to fight outsiders. They also banded together to fight each other.