The charge was brought against Socrates by Meletus, a poet, about whom little is known. In Athens at this time there were no public prosecutors; private individual citizens brought criminal charges to the government official (the King Archon in this case).
The indictment was posted in the Metroon, the temple that housed the city archives. Since the law against impiety was general, the charge of impiety had to be specified. It can still be read today:
“Socrates is guilty of refusing to recognize the gods recognized by the state and introducing other, new divinities. He is also guilty of corrupting the youth. The penalty demanded is death.”
Note that the one charge is impiety, and that these three claims explain the ways in which Socrates was impious. Furthermore, the law did not stipulate the penalty for impiety. Hence, the penalty was proposed by the person who was prosecuting the case. (If a defendant was found guilty, it was up to him to offer a counterpenalty. The jury was then left to decide between the two punishments).
Preliminary Hearing
Socrates first went to the King Archon, in the Royal Stoa (Stoa Basileios), who handled cases involving alleged offences against religion, for his preliminary hearing (anakrisis), to determine if the charges were in accordance with law.
Trial
The King Archon decided that the charges against Socrates were legal and had enough merit to warrant a jury trial, and a date was set. Since the alleged offences of impiety were crimes against the polis, the trial was an agon timetos, in which the conviction was to be established by a sworn jury, drawn by lot. The number of jurors, who were randomly assigned to different courts on different days, was, it is believed, 500. Large numbers prevented jury tampering or bribing. (Later, Athenian juries were odd-numbered; at this stage, however, a tie would have counted in Socrates’ favor). There were no prosecution or defense lawyers. The accusers and the accused spoke themselves.
The trial was presided over by the King Archon. It began in the morning and had to be completed by the end of the day. The speeches were measured by a water clock. More than likely the accusers had the morning to give their speeches, and Socrates had the afternoon to give his speech.
[in his trial] …there is Socrates’ speech protesting his innocence. After this the jury votes and finds him guilty by a margin of 30 votes.
Then there is his second speech, in which he first proposes, as his sentence, free meals for the remainder of his life at the Prytaneum, the hall where the members of the prytaneis dined, and where foreign ambassadors, victorious generals and Olympic athletes were also fed. Then, with the offer of money forthcoming from his friends Plato, Crito, Critoboulus and Apollodorus, he proposes a fine of thirty minae, quite a large sum of money (about eight and a half years of wages). After this the jury votes and sentences him to death, by a greater margin of votes than had voted him guilty.