In To Kill a Mockingbird, what are some examples of the legal system at work in chapters 12-18?
In Chapter 15, Heck Tate, who is the sheriff, comes to the Finch household to talk to Atticus about a potential mob since Tom Robinson is staying at the Maycomb jail. Since Heck Tate is the sheriff, he is a part of law enforcement. The fact that he's there in efforts to prevent a potential crime indicates that the law enforcement component of the legal system is at work.
In Chapter 16, the jury is selected. The town is filled with people wanting to find out more about the trial:
The courthouse square was covered with picnic parties sitting on newspapers, washing down biscuit and syrup with warm milk from fruit jars. Some people were gnawing on cold chicken and cold fried pork chops.
Toward the end of Chapter 16, Scout, Jem, and Dill make their way into the courthouse, getting seats with Reverend Sykes in the balcony. The chapter ends with Heck Tate on the witness stand.
Chapter 17 includes court proceedings, beginning with Heck Tate's testimony about the day he was called to the Ewells' home when Mayella was assaulted. He is questioned by Mr. Gilmer and Atticus. The remainder of Chapter 17 contains Mr. Ewell's testimony (also questioned by Gilmer and Atticus) and there is a significant moment when Atticus implies that Mr. Ewell, who is left-handed, could very likely be the one who assaulted Mayella.
Chapter 18 is mostly Mayella Ewell's testimony. It begins with Mr. Gilmer's questions and is followed by Atticus's. It is in this chapter that Atticus shows how it is more likely that Mr. Ewell, a left-handed man, would have beaten Mayella. During Mayella's testimony, Atticus asks Tom to stand and the court sees that his left hand is useless:
His left arm was fully twelve inches shorter than his right, and hung dead at his side. It ended in a small shriveled hand, and from as far away as the balcony I could see that it was no use to him.