Delphi is a small village in the mountains Northwest of Athens. No one quite knows when, but sometime in the misty pre-history of the Greek civilization a Delphic villager, probably seeking some refuge from the rigorous demands of her daily family duties, entered a small cave in the mountains. When she emerged, she seemed transformed and spoke incoherently. This was interpreted by the villagers as divine madness, or possession by the spirit of the chief god they worshiped: Apollo (also known as the Pythian god for his slaying of the great python of Delos). In this state of divine possession, the woman became an oracle, or mouthpiece of Apollo. Whenever she entered the cave she would become transfixed by the spirit of Apollo and could communicate directly to the people on behalf of the god. A small temple was erected around the cave and a religious order was founded. By making an offering to the god, one could ask advice on any pressing issue, from when to conduct a battle, to the most favorable time to plant crops. News of the Delphic Oracle quickly spread throughout Greece, and indeed the entire ancient world.
By the Fifth Century BCE, the time of Socrates, the Oracle of Delphi was firmly established as a center for divine communication. An elaborate system of priests and prophetesses had arisen and a line of succession for the main oracle had been established handing the title down from generation to generation. The temple was supported not only by individual devotes, but also received sponsorship from the major city-states of Greece. After all, it was well worth it to maintain a reliable seer for times of crisis when the insight of the gods could establish a city's fortunes in war or commerce.
The procedure of gaining access to Apollo's insights was simple enough. After having made an offering to the god, one could ask either a simple "yes" or "no" type of question, or a more open-ended question. Questions of the former type were referred to one of the temple priestesses who would reach into a bag and draw out a white or black stone, one meaning "yes," the other "no." The latter type of question was referred to the main oracle who sat in the mouth of the cave (around which a shrine had been built) in her divine trance. She would then deliver a, usually cryptic, response. It was up to the petitioner to interpret Apollo's message, but caved above the intrance to the temple was the inscription, "Know Thyself." This irony was not lost on the Greeks, but neither did it interfere with their devotion. The Greek religion had no single authoritative scripture, nor was there a single theological orthodoxy. Thus, the Greeks tended to take what might appear to us as inconsistency in stride as part of the mystery of life.
We have no way of knowing how seriously Socrates took the Delphic oracle, but it seems clear enough from Plato's account of his trial that Socrates did think the gods spoke to humans (he claims at the end of the Apology to have a divine voice which has guided him throughout his life). It is clear, however, that Socrates was well aware that any Word from the Oracle could not be taken at face value and had to be carefully considered. Thus, while Chaerephon seems to have taken the claim, "no one is wiser than Socrates," to mean that Socrates was the wisest man alive, Socrates himself was less sure.