The Greek city-states were grouped together at the southern end of a very large peninsula. located in southern Europe, that jutted out into the Mediterranean Sea. A peninsula is a piece of land surrounded by water on three sides. Smaller peninsulas stuck out from the main Greek peninsula, forming a great deal of natural coastline and many natural harbors. The Greeks could always count on seafood to eat.
But they needed a source of fresh water to settle down in an area. Greece has lots of mountains. They are not huge mountains like the Alps. But they are big enough to provide two important things - a source of fresh water, running down the mountains in creeks and streams, and a system of natural defense barriers. The ancient Greeks found it very difficult to visit some of the other city-states over land. The mountains were in the way. An easier route was to travel by boat. The Greeks soon became great sailors.
The Greeks sailed up and down the Mediterranean, looking for new places to establish towns. People who were already living in these places were not always welcoming. The Egyptians chased the Greeks out. The Greeks were able to set up some Greek cities on the coasts of Italy, Africa, and Turkey.
The ancient Greeks had no central government. They were not building an empire. They were just exploring and expanding and establishing "outposts" as their population grew. Each of these outposts was an independent city-state.
Some of these city-states thought of themselves as Greeks. Over time, most begand to think of themselves as friends (or enemies) of the Greeks. So you might find an outpost whose people believed in the same gods and goddesses as the ancient Greeks, but who did not speak Greek or who did not have the same customs as the Greeks or who did not wear the same style of clothes as the Greeks. A good example is the city-state of Troy, located on the Turkish coast.