You've got a character who's a lawyer, law student, or judge. Or you have a character who's thrown into a legal situation: a defendant in a criminal trial, a witness being deposed for a civil case, or even someone serving on a jury. Legal scenarios arise in real life all the time, so it's not surprising that they also proliferate in fiction. Yet many writers get basic elements of the law and legal situations wrong, and this can be distracting for readers (especially readers who are familiar with and/or work in the legal field).
A guide on writing legal scenarios correctly goes way beyond the scope of this post, but I'd like to point out four common mistakes I see in novels, movies, and TV shows. If you can avoid these mistakes, you'll have a head start on writing a realistic legal scene.
NOTE: I'm restricting this post to the American legal system. Other countries have different laws and procedures, so make sure you research those legal systems (along with the American system, where applicable) thoroughly. And always have a lawyer beta read these scenes for you to ensure they are as realistic as possible.
Mistake #1: Courtroom scenes aren't generally like INHERIT THE WIND or TO KILL A MOCKINGBIRD.
Everyone loves a good trial scene, where the attorney waxes eloquent about civil rights, the human condition, and truth, justice, and the American way. This rarely happens in real life. Sure, a good attorney will advocate strenuously for her client, and lawyers are allowed a lot of leeway during opening and closing arguments to do so. But judges won't allow lawyers to go overboard, and most trials have set amounts of time for each portion (direct/cross examinations, opening/closing arguments, etc.). A lawyer going way over his time while delivering a stirring closing argument will be more likely to be admonished to sit down than applauded for his fervor. And, while it rarely happens, opposing counsel can object during opening and closing arguments, and if the objection is sustained, the judge may instruct the jury to disregard the objectionable portion of the argument.
Mistake #2: The basic terminology is incorrect.
Criminal and civil cases have a lot of similarities, but there are some major differences in terminology. Getting the basic terms wrong is distracting for many readers. For example, the parties in a criminal case are the State (or the U.S., in a federal case) versus one or more defendants. In a civil case, you've got plaintiffs versus defendants, instead. A defendant in a criminal case is found guilty, and a defendant in a civil case is found liable. There are many other differences like these, and it's worth finding a good legal dictionary to make sure you're getting the terminology right.
There are also differences between cases brought in the state court system, as opposed to the federal court system. Make sure you know which court the case you're writing about would have been brought in and research the heck out of the judges, local rules, and other information that can usually be found on the court's website.
Mistake #3: Most law students are not Elle Woods.
Don't get me wrong: I loved LEGALLY BLONDE. It's a fantastically fun movie. But it's also not a documentary. No 1L student (first-year law student) is going to get an opportunity to second-chair a high-profile murder trial, let alone take over questioning key witnesses. Setting aside the fact that first-year law students are still several years away from being licensed to practice law, there are many other reasons why this scenario is unrealistic. First-year law students spend a ton of time reading published cases (many of which are over 100 years old), outlining those cases, and talking about those cases in class. They generally do not have the practical understanding of the law necessary to effectively manage a case, run a trial, etc. When in doubt, consult with a lawyer or law student to find out what tasks would be realistic for a law student to take on.
Mistake #4: It can take years for a case to get to trial, and the vast majority of cases never go to trial.
Whether criminal or civil, most cases (well over 90% in some fields) settle before trial. While trials are dramatic and a great way to build tension, keep that fact in mind and make sure to include a reason your case is going to trial (a stubborn defendant, a plaintiff who refuses to settle, etc.).
Even if a case does make it to trial, most court systems are extremely backlogged, and it may be years before a trial date is set. Criminal cases do tend to move much faster than civil cases, but continuances (where the court decides to delay the trial date) and other delays are very common. When in doubt, contact a law clerk at the courthouse your fictional trial would be set in, and ask for the typical time-to-trial for the type of case you're writing about (many courts keep these statistics, and if not, the clerks will have a general idea). But make sure to account for several months (at the low end) between arrest and trial in your book.
Overall, when in doubt, do your research or contact a practicing lawyer. It never hurts to have a lawyer as a critique partner, either, especially if you've got courtroom scenes or other legal scenarios in your book.