One of Plato’s recurring and overriding goals is to discover what it means to be just. In order to talk about how one should live he begins by talking about how our soul is constituted and what sort of relation the just man stands with in regards to his soul. According to Plato, justice is the excellent state of soul. To explain this excellent state of soul Plato introduces his famous tripartite theory of soul using an allegory of a chariot, where in charioteer represents the rational part of the soul, a white horse represents spirited part of the soul and a dark horse represents the appetitive part of the soul. The rational part is guiding the horses and chariot. This is the part that thinks, analyses, looks ahead, rationally weighs options, and tries to measure what is best and truest overall. Wisdom is the virtue of this rational part.
The spirited part is the fraction of soul which executes the commands of rational part. Courage is the virtue of spirited part so that it gets angry when it perceives an injustice being done. This is the part that loves to face and overcome great challenges, the part that can steel itself to adversity, and that loves victory, winning, challenge, and honour. (Note that Plato’s use of the term spirited here is not the same as spiritual. He means spirited in the same sense that we speak of having lots of energy and power.) The appetitive part includes all our myriad desires for various pleasures, comforts, physical satisfactions, and bodily ease. There are so many of these appetites that Plato does not bother to enumerate them, but he does note that they can often be in conflict even with each other. Temperance is the virtue of appetitive part.
It is already mentioned that justice is the excellent state of soul. Then, what does he mean by justice? Justice is harmony of these three parts in which reason rules. Each has its role to play; each pursues its own goal. In order for a man to be just, he claims, each part of the soul must not escape its bound but rather fulfil its respective task and nothing else. But rational part controls the whole system of soul. It commands the spirited part to control various and conflicting array of desires of the appetitive part. Plato applies this same system of soul to the society. In order to be a just or virtuous society, there must be a ruler with wisdom (rational part), soldiers or executors with courage (spirited part) and a common flock or workers with temperance (appetitive part) and these parts of the society should be in harmony with each other where rational ruler controls.
From this theory of soul we can come to the point that our mental actions can be executed justly, i.e. in a way that is good in itself, for our thought is rationally governed, and good for its consequences, for the actions of a justly governed mind will themselves be just and produce publicly observable justice. This is the form of the instantiation of self-mastery and internal harmony within the mind and self and, as Plato argues, is the essence of justice in the individual. Personal and individual justice leads to social justice. If person is just, the society, as the collective form of persons will be just.