Justice, at its base, means "to be just, fair". Most commonly however, the meaning of justice is to punish a criminal that has done something wrong in a suitable manner that fits their crime.
Justice, in this sense, can be served to a criminal in many ways from time in prison to execution. The classic view of how a criminal should 'receive justice' is thought of as "an eye for an eye", which means if they have done something wrong, they deserve a punishment as great as the crime they committed. If a person murders someone, then according to this term, it means they themselves should face the death penalty as a suitable form of justice.
Justice has been used numerous times in the series. The CP9 use this term against Iceburg, and the Marines use this term to catch pirates and criminals. Justice is used in an archetypal pattern often at times (e.g. someone would talk about doing things "In the name of justice" or "ridding the world from evil").
Forms of justice are shown in the series. Marines may choose to display signs of Justice based on their own interpretations or opinions of the word "Justice". Some example of different opinion-based ideas on justice include Kuzan who declared he served a "Lazy Justice", Rob Lucci who claimed to serve a "Dark Justice" and Smoker who told Tashigi to create her own "personal justice".
Doflamingo, though a former World Noble and Warlord, is not without some opinion in regarding what is and is not justice, but he himself does not seem to care for it. He truly believes justice is whoever is in charge deem it to be and regards the outcome of the Marineford War will have the right to say what is and is not justice.
A common theme is that corrupt members of Marines and CP9 often use Justice as vindication for their actions, putting every inhumane thing they have done as a necessary evil to preserve peace to the world. This has often led people (most of them pirates) to react with disgust at their behavior.