Ancient Greek religion had two main sources and levels, and although there have been many attempts by poets and philosophers alike to make these two levels coherent and harmonic, they never quite managed to do it. These two levels are: The Chthonic Deities
and tradition and the Olympic Deities
The great works of the old Epic poets of Greece (and I mean ancient by even the classic Greek standards), of whom a scarce few survived, had one great aim at heart: to combine the different local myths of Greece (by which term I mean not only mainland Greece, but also the Aegean isles as well as Ionia and Aeolis and the apoikiai), and the different religious traditions and practices into one coherent narrative. This narrative was named Mythology and is not to be confused with myth or religion (worship). These are completely different aspects of the Greek religious experience, and although interweaving, are quite distinct from each other.
But even as the great work of the poets was essential to the composition of a common and shared mythology for all the Greeks, based on their more familiar local traditions, it couldn't help but leave "loose ends", that didn't quite fit with each other, and that sometimes downright contradicted each other. The greatest of these incosistancies was, as mentioned before, that of fitting the two ancient traditions of the Chtonic and the Olympic.
The main source (even in ancient Greece) for the origin of the Olympians is Homer. So great is his influence, that some consider him the very originator of Olympic Religion. Hesiod is our most early source for the Chthonic Religion, and although he is much later than Homer, his work represents an earlier, more primitive stage of Greek religious developement.
While the Chthonic Deities are connected with the chaotic and primeval forces of nature, and are connected with fertility, magic, night, death, disease, simple emotions etc., the Olympians represent order, control and excellence. They are the gods of the aristocracy in Homer, and are to noble people, what nobility and royalty should be to commoners. As monarchy dwindled, and the polis was on the rise, the Olympic Gods were patrons of the polis and the protectors of the poleis as the essense of culture versus the wildness of nature, that surrounds the city.
The Greek gods were not required to be moral or ethical, (that changed later as philosophy evolved, but only partly), and were never transcendent. They were part of nature, and although controlled parts of it and could face and influences their destinies better than humans, were still subjected to their fates. No god, no matter how powerful, not even all the gods together could, for instance, destroy the world and reurn in to its pre-creation state. The world is as immortal as they are.
Though many gods resided on Olympus, and none of them were Chthonic, the number of the true Olympians was set to twelve (though there were several versions as to who the twelve were). The true Olympians were: Zeus, Hera, Poseidon, Demeter, Hades, Hestia, Apollo, Artemis, Hephaestus, Aphrodite, Ares and Athena. However, Hestia, Hades, Ares and Hephaestus could each be interchanged with Hermes, Dionyssus or Herakles, according to the Mythology each of these was a god born in a strange circumstance, and therefore had to prove his worth in order to gain his place with the Olympians, but really these different versions show the contradictions in the Mythology.
Greek and Roman Mythology