Forensic psychology involves applying psychological principles and expertise to legal matters. Forensic psychologists help in various legal proceedings such as assessing a defendant's mental state, determining competency to stand trial, and evaluating risk of violence. They may assess whether a defendant is mentally fit to endure trial or should receive psychiatric treatment instead. Forensic psychologists also provide expert opinions and testimony in both criminal and civil cases. Their evaluations aim to preserve fair legal proceedings while protecting defendants' rights and reducing erroneous convictions.