Each crime has its own set of elements—components that the prosecution must prove beyond a reasonable doubt in order to establish the defendant's guilt. If the prosecution fails to prove any element, then the jury must acquit.
For example, a drug possession law might require that the defendant:
So, if the prosecution can establish that Michael had a bag of marijuana in his pocket, but can't show that he knew that the substance was cannabis rather than caprese salad, the jury must acquit. Or, if the government can show that Wallace had cocaine inside his jacket pocket, but that it was only a trace amount that couldn't be used, then he isn't guilty.
For further reading on a related topic see Lesser Included Offenses.