Immunity from prosecution is an important tool for prosecutors. They can offer immunity to witnesses for all types of crimes, even serious ones like kidnapping and murder. But prosecutors will often give immunity to a person who has committed minor crimes in order to compel that person to testify against someone who has committed more significant offenses. A common example is a prosecutor offering a small-time drug dealer immunity in exchange for against a big-time drug lord.
A witness who refuses to testify after being given immunity can be held in contempt of court and subjected to fines and jail time. And even after a grant of use and derivative use immunity, the witness isn't necessarily in the clear: The prosecution can still go after the witness. That said, once the prosecution has granted immunity, it's limited in how it can use that testimony in the future. If the prosecution eventually seeks an indictment against an immunized witness, the prosecutor and law enforcement must show that the case is based solely on evidence that's independent of the witness's immunized testimony.
A witness who is being prosecuted and intends to claim immunity from prosecution must provide evidence that the prosecution granted immunity and that the testimony in question relates to the current charges. After that, the burden of proof goes to the government.
Prosecutors must show that all of the evidence they intend to use comes from an independent source. If the prosecution had access to the immunized testimony, it must reveal how it developed independent evidence against the defendant. It's not enough for the prosecution to simply deny using the immunized testimony—it must present evidence (either written or oral statements) explaining how the evidence doesn't emanate from the defendant's previous testimony. However, it's okay if the prosecution had tangential knowledge of the immunized testimony.
If a judge rules that prosecutors have improperly used immunized testimony, the usual remedy is to block them from using it at trial. If there's no evidence that's entirely distinct from the immunized testimony, the court will dismiss the case.
Immunity is a privilege; the immunized person can therefore waive it. One way is to explicitly state the intention to waive the privilege. For example, a witness who has received immunity may sign a written statement to the court waiving immunity and acknowledging that he is now subject to prosecution. Waiver also happens when a witness has immunity, but doesn't assert it in a timely manner—for example, by freely giving a statement to the police after receiving Miranda warnings, not mentioning that he has immunity until trial.
A witness can also waive any chance at immunity before receiving it. This happens when a witness testifies voluntarily without the protection of immunity.
Once a person has waived immunity, the government can use the previously immunized testimony to prosecute him or her.
If you've been asked to or think you should testify or otherwise cooperate with the authorities, consult an experienced criminal defense lawyer. Only such a lawyer can explain the ins and outs of immunity, make sure that you don't waive it if you have it, and otherwise protect your rights.