From whats been shown so far, the marines exclusively decide to put bounties on people's heads without a trial and once captured, send them to prison indefinitely. The only time a courthouse was shown was at Enies Lobby where the jury is fixed to declare a verdict of guilty 100% of the time. Although Tom's case was heard by a representative judge, the choices that were present were either death or pardon (I think). Outside of the world government, each kingdom (like Arabasta, Fishman Island, etc.) have their own prisons and people have been shown to be thrown in jail without a trial (Dalton in Drum Kingdom, Zoro on Fishman Island, etc.).
I hope someone corrects me if I presented any incorrect/inaccurate information... this is about all I remember regarding the judicial systems in One Piece so far
.