The first question of values is what it is that has the value. In the case of virtue, there are two possibilities, not necessarily exclusive of each other. The one is the person, another the acts that the person undertakes. Later, we will consider the state, which is more properly regarded as than virtuous.
The second question is what it is that characterizes a virtuous person or act. A popular characterization of a virtuous act, and one which often seems to be what Socrates had in mind, is that it is one that has good consequences. If Socrates' escape from prison would bring shame on his family, that is a reason why escaping is not a good thing for him to do. In general, Socrates was not concerned with what makes a consequence good; he more or less took it for granted that obeying the gods was good and bringing shame on one's family is bad.
If consequences are definitive of a virtuous act, it might be thought that a person is virtuous as a result of performing virtuous acts, that is, that doing things that turn out well is what makes a virtuous person virtuous. This claim is quite widespread among modern philosophers, who judge people by their deeds.
The ancient Greek philosophers, on the other hand, reversed the order of priority. A virtuous person is one who attains excellence, where excellence is a state of the soul, a kind of healthiness of the soul. Someone with a healthy soul will naturally do good things. That is, the virtuousness of the act lies in the fact that it is the kind of thing done by a virtuous person. This view is represented in a passage from the end of Book I of the Republic, "Then a person with a bad soul will govern his life badly. The person with a good soul will govern his life well. . . . Do you recall our agreement that justice is the peculiar excellence or virtue of the soul, and injustice its defect? . . . Can we now agree that the just will live well but that it will go ill with the unjust?"
For Socrates, there arose the question of the justness of the state. In particular, he considered the question of how he should act given that he was unjustly convicted. His answer was that the injustice was on the part of the people carrying out the laws, rather than the laws themselves. Thus we can consider the state in terms of the laws governing it, and a good state will have good laws.
The laws of a state are a matter of tacit agreement among the citizens to unite for their common benefit. This has come to be known as the "social contract." In Socrates' day, it was possible for any individual to emigrate with ease, thus the "contract" was much more voluntary than it is now. Socrates had made his choice to benefit from the laws, and so he was constrained to obey them, even when unjustly carried out. In the Republic, Glaucon had ridiculed this notion of a contract: "Justice is praised only by those too weak to do injustice and . . . anyone who is a real man with power to do as he likes would never agree to refrain from doing injustice in order not to suffer it. He would be mad to make any such agreement" (Book II, p. 59).