According to Socrates, what must happen if there is to be true justice?
Socrates has a whole program for justice that involves social and individual instructions.
For Socrates, justice will thrive if the entire society is run efficiently with the goals of justice in mind. Therefore, he initially prescribes that each person should become adept at a certain skill, thus each contributing something different to the social whole. Along these lines of specialization, Socrates proposes a singular group of soldiers to serve as the army (contrary to the Athenian idea that all citizens could/should be soldiers).
Socrates also proposes that the society should be governed by Guardians or Philosopher-Kings. Socrates has specific conditions for the education of the Guardians and soldiers, the latter of which should not hear tales of Hades so that they will be brave by not fearing death. The interesting thing here is that Socrates is literally proposing censorship, notably of poetry and myth - that only certain subjects are suitable for poetry and that only certain knowledge is suitable for certain classes (by occupation) of citizens. Socrates also has dubious notions about the roles of doctors. If the goal is general health, then there is no place for the sick. This is quite inhumane by modern standards.
In Book 3, Socrates proposes that a new myth should be created, one that teaches that all citizens are equal. This myth and other knowledge will be imparted to the people, as much as they need, by the Guardians/Rulers. The Soldiers will keep the peace. With this setup, Socrates sees the potential for justice: a grand narrative to unite everyone.
Inevitably, justice exists/occurs in the individual mind. Just as the State/citizens should be governed by the Guardians who rule by reason, the individual must govern himself by reason first. His desires, etc. should not influence or come before reason.
There is another dubious passage on gender equality. Socrates notes that women and men are equal but that the best men are better than the best women, which is clearly evidence of inequality. By modern notions, this is confusing at best, or simply bad logic and/or bad ethics. The section on child raising is even more appalling considering the notion that well-bred children will be raised well and the poorly-bred will be taken away. Inhumane as it is, Socrates is relying on cold-hearted logic to create a just society where the children most likely to be philosophical and logical are lifted above others. This is an "end justifies the means," but the means are certainly not just.
In the end, Plato/Socrates claim that justice begets justice. In other words, live a just life and you will be rewarded with just desserts. If you are not, you will be rewarded in the afterlife - and this ties in to the immortality of the soul. If anything, this essential maxim that justice begets justice (now or later) shows how Socrates viewed the purity and reciprocity of justice - similar to karma from individual and social standpoints.
There are a lot of elements in this program for justice (from the social to the individual) that are unthinkable to the 21st century reader. Socrates' arguments are based on reason and at times an "end justifies the means" mentality (consider the unsettling section on child raising).