Plato's The Apology is an account of the speech Socrates makes at the trial in which he is charged with not recognizing the gods recognized by the state, inventing new deities, and corrupting the youth of Athens. Socrates' speech, however, is by no means an "apology" in our modern understanding of the word. The name of the dialogue derives from the Greek "apologia," which translates as a defense, or a speech made in defense. Thus, in The Apology, Socrates attempts to defend himself and his conduct--certainly not to apologize for it.
For the most part, Socrates speaks in a very plain, conversational manner. He explains that he has no experience with the law courts and that he will instead speak in the manner to which he is accustomed: with honesty and directness. He explains that his behavior stems from a prophecy by the oracle at Delphi which claimed that he was the wisest of all men. Recognizing his ignorance in most worldly affairs, Socrates concluded that he must be wiser than other men only in that he knows that he knows nothing. In order to spread this peculiar wisdom, Socrates explains that he considered it his duty to question supposed "wise" men and to expose their false wisdom as ignorance. These activities earned him much admiration amongst the youth of Athens, but much hatred and anger from the people he embarrassed. He cites their contempt as the reason for his being put on trial.
Socrates then proceeds to interrogate Meletus, the man primarily responsible for bringing Socrates before the jury. This is the only instance in The Apology of the elenchus, or cross-examination, which is so central to most Platonic dialogues. His conversation with Meletus, however, is a poor example of this method, as it seems more directed toward embarrassing Meletus than toward arriving at the truth.
In a famous passage, Socrates likens himself to a gadfly stinging the lazy horse which is the Athenian state. Without him, Socrates claims, the state is liable to drift into a deep sleep, but through his influence--irritating as it may be to some--it can be wakened into productive and virtuous action.
Socrates is found guilty by a narrow margin and is asked to propose a penalty. Socrates jokingly suggests that if he were to get what he deserves, he should be honored with a great meal for being of such service to the state. On a more serious note, he rejects prison and exile, offering perhaps instead to pay a fine. When the jury rejects his suggestion and sentences him to death, Socrates stoically accepts the verdict with the observation that no one but the gods know what happens after death and so it would be foolish to fear what one does not know. He also warns the jurymen who voted against him that in silencing their critic rather than listening to him, they have harmed themselves much more than they have harmed him.