How did the ancient Greeks think Greece, the world and the cosmos came to be?
Hesiod, in his account of genesis says simply that first Chaos "came into being" (Theogony 117). He then gives a rather mythological description of the formation of the universe. He just lists an order of birth. This would have been the common teaching for ancient Greeks.
An important point to note is that Greek philosophers didn't (generally) have a theory of genesis in the Judeo-Christian sense of matter/space being created from nothing. They believed that matter had always existed.
On the other hand, for some the Cosmos being an ordered arrangement of matter, could come into being by the movement of matter (Democritus). But for others the Cosmos always exists (Heraclitus).
Starting with the very earliest philosophers (Thales, Anaximander, Anaximines), there is no genesis of the stuff the world is made out of.
A good quote:
"This kosmos, the same for all, none of gods nor humans made, but it was always and is and shall be: an ever-living fire, kindled in measures and extinguished in measures." (Clement, Miscellanies 5.103.3; tpc) On Heraclitus
See "Readings in Ancient Greek Philosophy" by Marc Cohen et al for good translations of primary sources.
I believe there were a few different theories at various times, but one account of this can be found in Hesiod's Theogony, which discusses the origins of the universe and the Greek gods.