Just because a party offers evidence in a criminal case doesn't mean the judge will allow it. The offered evidence must comply with several rules before a judge will admit it into the case. One such rule is that a party seeking to offer a tangible object as evidence must establish an unbroken and reliable "chain of custody."
The chain of custody shows the path the evidence took from the crime scene (or elsewhere) to the courtroom to ensure it's what the party says it is and it hasn't been tampered with. For example, if a prosecutor in a murder case wanted to introduce a knife found at the crime scene, they'd have to establish a chain of custody to prove that it was in fact the knife found at the scene and not some other knife.
The parties at a trial or hearing usually have to establish a chain of custody for the exhibits they want to introduce. Exhibits are tangible objects that are relevant to the facts of a case. Here are a few examples:
Proving that an exhibit is exactly what it purports to be—the actual drugs found on the defendant or the very cellphone stolen from the store—requires proof of who had possession of the exhibit at all times between the time officers seized it and the trial. Because criminal prosecutions typically depend on evidence gathered by police officers, it is prosecutors who generally need to establish a chain of custody.
Let's assume that Hy Immer is on trial for possession of cocaine. To prove Immer guilty, the prosecutor must establish that the substance in Immer's possession was in fact cocaine. The prosecutor offers as evidence the packet of powder that a police officer removed from Immer's pocket. The prosecutor also offers evidence that scientific testing proved that the powder in question is cocaine.
To establish the chain of custody for the packet, the prosecutor must:
The chain of custody works to ensure the evidence is what it purports to be, has not been tampered with or altered, and has been appropriately handled and tested. Without such measures, judges and juries might base a conviction on planted evidence, inaccurate test results, or an item that was never at the crime scene.
Most often the defense will be in the position of challenging the chain of custody. A typical defense strategy is to attack the sufficiency of the prosecutor's chain—link by link. The defense might do this by showing an irregularity or discrepancy in the timeline or documentation, or challenging how the item was stored, labeled, or tested. If the defense succeeds in preventing the prosecutor from offering an exhibit into evidence, the judge might rule that the prosecutor has insufficient evidence to allow a case to continue. (That determination rests on how crucial the piece of evidence is to the case.)
Going back to Immer's example, his attorney can challenge each and every step in the seizure-storage-testing-transportation process. If the prosecutor cannot convince the judge that the foundation is adequate, the judge will rule the packet inadmissible and, in all probability, dismiss the case.