Delphi (DELL-fee), in central Greece, seems to have been a sacred shrine even before the Greeks arrived in Greece around 2100 BC. Later Greek myth said that Delphi was originally sacred to a giant snake, but when Apollo came he killed the snake and took over its shrine.
Why was Delphi so sacred? According to the archaeologist John Hale, because it had a methane gas leak, and if you breathed enough of this methane gas, it would intoxicate you (like being drunk or high) and you would say mysterious things. There was a story around Delphi that the "crack in the earth" was first discovered by goatherds, who saw that whenever their goats got near this place, they started acting funny. Then the little goatherds tried it themselves, until the grownups interfered.
Pythia at Delphi, with Aegeus
People built the temple of Apollo at Delphi right over this crack in the earth, and when you wanted to ask the god a question, the priestess went right down into the basement where the crack was, breathed in the gas, and answered your question.
Nobody knows exactly when this started, but certainly before about 700 BC. And the oracle continued to answer questions right up until 390 AD, for more than a thousand years. Most of the time, people were pretty happy with the prophecies. But it is noticeable that for many years after the Alcmaeonid family paid to rebuild Apollo's temple in the 500s BC, the Pythia tended to take their side in arguments. The same goes for the Spartans around 400 BC.
As time went on, fewer and fewer people came to ask questions. Maybe the methane gas had all run out by this time, and so people didn't have as much faith in the oracle as before. In 362, Oribasius visited Delphi on behalf of the Roman Emperor Julian and got this response: "Tell the emperor that the great hall fell to the ground. Phoebus (Apollo) no longer has his house, nor the laurel of prophecy, nor the speaking well. The speaking water has also gone."
Learn by doing: read your horoscope online. How easy is it to make predictions that seem to fit your life?
More about Oracles
The Delphic Oracle: Its Responses and Operations, by Joseph Fontenrose (reprinted 1981). For some reason there isn't any recent book on Delphi, that I know of.
Greek Religion, by Walter Burkert (reprinted 1987). By a leading expert. He has sections on each of the Greek gods, and discusses their deeper meanings, and their function in Greek society.
The Greeks and the Irrational, by E.R. Dodds (1957). Old, and the Freudianism is outdated, but still an interesting look at Greek spirituality and faith.