In criminal law, an alibi is a defense to a crime. When a defendant (the person accused of a crime) raises an alibi as a legal defense, the defense must prove that the defendant could not have committed the charged crime because the defendant was not present at the scene when the crime was committed. In situations where the defendant is accused of committing or participating in the crime or having been at the crime scene, an alibi can serve as a complete defense to the charges. If the judge or jury believes the alibi evidence, the defendant must be found "Not Guilty."
When a defendant raises the defense of alibi at trial, it is not necessary that the defendant prove the alibi beyond a reasonable doubt or by a preponderance of the evidence. All that is required by the defendant for an alibi defense is to introduce enough evidence to raise a reasonable doubt at trial. The prosecutor is allowed to introduce evidence to disprove the defendant's alibi.
Ultimately, the prosecutor must prove beyond a reasonable doubt that the defendant committed the crime(s). If the jury or judge has a reasonable doubt about whether the defendant was present when the crime was committed, then the defendant must be found not guilty and acquitted of the charges.