In the legal context red herring refers to an irrelevant legal or factual issue, intended to distract or mislead. An irrelevant factual or legal issue can be raised in case laws and in law exams when a legal matter which is generally important but not relevant to the issue or question at hand. It can also refer to the process of deliberately changing the subject to evade a direct enquiry and providing misleading answers to questions.
Literally the expression refers to the practice of diverting the interest of a person from one thing to another. Mostly, red herrings are used in fiction, in cases, or by law students. In mystery fictions the idiom - red herring refers to a situation where an innocent party in a story plot is purposefully cast suspiciously through emphasis and writing techniques to divert the attention from the guilty party.