The "Old News" Charges
Socrates begins with a discussion of what he calls "the old prejudices" Athenians hold against him, and offers an initial defense by pointing to what he thinks are fairly obvious facts of his life up until this point.
Socrates reminds the court that he focuses his entire life on the discussion of topics surrounding questions of values and the virtues, in an attempt to reject the charge of developing a "false cosmology" which runs in opposition to the interests of Athens. In short, he suggests that he really just wants to help people live good lives.
Food for thought: In response to the charge of sophistry, Socrates points to his relative poverty to reaffirm that he hasn't been paid for his teachings a day in his life. Why might this be particularly important for Socrates? Why does he resist this charge so fervently?
A Tale from Delphi
At 20e-22a (in the standard Stephanus pagination), Socrates recounts a prophecy of the well-known (in Greek mythology) Oracle at Delphi. A friend of his once visited the Oracle to ask after the wisest man in Greece. She replied by pointing the friend to Socrates. When he heard this, Socrates was shocked, as he thought of himself as quite ignorant.
After some confusion and hesitation, he sought to prove this saying incorrect by finding someone wiser than he. He began his well-known process of questioning people in the public places of Athens, including politicians, poets, and craftsmen. No person he met was able to demonstrate the kind of wisdom Socrates sought.
After following this trend for many years and exhausting many seemingly obvious possible avenues for wisdom, Socrates began to accept the truth of the Delphic Oracle's prophecy. In his view, the claim that "Socrates is most wise" can be expressed in a different way, namely: Socrates is wise because he is aware of his own ignorance in a way that those he spends his time interrogating do not. This is the foundation for one of the most oft-cited lines from Socrates, an essential relation between wisdom and ignorance:
The New Charges (of Meletus, Anytus, et al)
After dismissing his old charges via the story of the Delphic Oracle, Socrates takes care to respond directly to the current charges he is being interrogated about by Meletus and Anytus: corrupting the youth of Athens and failing to believe in the state Gods.
If Socrates is such a terrible influence on the youth of Athens, he asks, who can serve as a good influence? After all, he's trying to make them better, more reflective citizens... Who or what else can do this? Athens and its institutions (at least on Socrates' view) aren't doing so well in this regard. He argues that he's being singled out when all he wants is to help. After all, is it not better to have good citizens than bad??
Socrates also takes care to argue that he does, in fact, believe in a realm of the supernatural, which directly contradicts the charge of atheism.
Socrates' Defense of the Reflective Life
In addition to responding directly to the charges leveled at him, Socrates provides a positive defense of his life's pursuit, namely that of philosophical reflection.
Socrates means no harm. He insists that, quite the contrary, his wisdom is "the most valuable asset [the city of Athens] can possess," whether they like it or not. On his view, he behaves the way he does because it is right. He maintains that he is on a mission from the Gods to continue bettering himself and his fellow man. As he suggests, the Gods have set him on the city as a gadfly on a horse.
Sometimes, of course, this pursuit of critical awareness and betterment can be difficult and abrasive, but Socrates argues that it would be wrong and disgraceful to ignore this duty because of fear of death. Socrates goes as far as to say that if the court required him to stop his pursuit of philosophy, he'd much rather die. Here, Socrates directly challenges the people of Athens. If they choose to execute him, he says, they're only harming themselves.