The life and teachings of Socrates (c. 469-399 B.C.) stand at the foundation of Western philosophy. He lived in Athens during a time of transition (Athens' defeat at the hands of Sparta in the Peloponnesian War (431-404 B.C.) ended the Golden Age of Athenian civilization) and had a tremendous influence on the Athenian youth of his day. Socrates himself never recorded his thoughts, so our only record of his life and thought comes from his contemporaries. These accounts are mixed and often biased by the authors' personal interpretations.
It seems that Socrates led a very simple life, renouncing wealth and holding himself aloof from political ambitions, preferring instead to mingle with the crowds in Athens' public places, engaging whomever he could in conversation. Nonetheless, he did serve as a hoplite (heavy infantryman) in several battles during the Peloponnesian War, and was distinguished by his fortitude and bravery. In 399, Socrates was brought before a jury of around 500 Athenians on charges of not recognizing the gods recognized by the state, of inventing new deities, and of corrupting the youth of Athens.
The most likely reason for this trial is Socrates' close association with a number of men who had fallen out of political favor in Athens. But because an amnesty had been declared for political offenders, other charges had to be brought against him. Socrates was found guilty by a narrow margin and then sentenced to death.
Plato (c. 427-347 B.C.), the author of The Apology, was one of Socrates' greatest admirers, and our knowledge of Socrates stems mostly from Plato's dialogues (for competing accounts, see Aristophanes' satirical presentation in The Clouds and the writings of Xenophon). Plato was born into a prominent Athenian family, and was expected to pursue a career in politics. However, the short-lived Spartan-imposed oligarchy of the Thirty Tyrants (404-403) and the trial and execution of his mentor, Socrates, led Plato to become disgusted with Athenian political life, and he devoted himself instead to teaching and philosophical inquiry. To that end, he founded the Academy around 385 B.C., which counted Aristotle among its students. The Academy lasted in one form or another until 527 A.D., 912 years in total, and served as the prototype for the Western university system.
Plato's thought is mostly recorded in the form of dialogues which feature Socrates as the protagonist. Apparently, the Socratic dialogue was a genre form at the time; not just Plato, but many of Socrates' other students recorded philosophical debates in this form. Plato's dialogues are generally classed into early, middle, and late periods. The early dialogues were written soon after Socrates' death, and in them we get the clearest picture of Socrates and Socratic philosophy. As Plato matured, however, he developed an increasingly distinct voice and philosophical outlook. The figure of Socrates in the middle and late dialogues (for example, The Republic and Phaedo) is more of a mouthpiece for Plato's own views. The Apology is one of Plato's earlier dialogues, in which we find none of his more characteristic doctrines, but rather a stolid attempt to present an honest and sympathetic portrait of his mentor. Presumably, Plato's aim was, at least in part, to defend Socrates' reputation after Socrates' trial and execution.