How did the current criminal justice system in the United States evolve?

How did the current criminal justice system in the United States evolve?