Generally, the prosecution has the burden of proving every element of a crime beyond a reasonable doubt. But while a defendant isn't required to prove innocence in order to avoid conviction, the prosecution doesn't have to prove guilt to the point of absolute certainty. And despite the general rule that the prosecution bears the burden of proof, there are instances when the burden shifts to the defendant.
(For more on "beyond a reasonable doubt" and other issues of proof, see Legal Standards of Proof.)
When the prosecution establishes a fact that tends to prove an element of a crime, the burden essentially switches to the accused, not necessarily to disprove the fact, but to raise a doubt about it. The defendant need not raise a doubt about every fact that the prosecution tries to prove—creating enough doubt about any point that's crucial to a guilty verdict will suffice. Of course, the more convincing the fact is, the tougher the defendant's burden is.
For instance, suppose the prosecution shows that, when searching the defendant, the police found a watch that store records reflect as stolen. In defense of a burglary charge, the defendant would probably have to give a plausible explanation for possessing the watch legally. By producing a receipt or testimony that the watch was a gift, the defendant would essentially shift the burden back to the prosecution.
In virtually every criminal case, the prosecution must prove that the defendant had a particular intent. Theft, for example, requires that the defendant intend to take an item and not return it. The intent to achieve a certain outcome makes it a "specific intent" crime.
With a general intent crime, the prosecution needs to prove only that the defendant committed the act in question, not that he intended any particular outcome from the act. For example, simple assault and battery is a general intent crime, requiring that the defendant intend to hit someone or disregard a clear risk of hitting someone. But assault with intent to rob is a specific intent crime because it requires that the defendant not only intend to strike someone, but also with the intent to rob that person.
For more on this area of law, see General Intent Crimes vs. Specific Intent Crimes. Also see How Defendants' Mental States Affect Their Responsibility for a Crime.
An accused may claim that certain circumstances constitute a complete defense to actions that would otherwise be criminal. These circumstances are called affirmative defenses. Whether and to what extent the defense must prove an affirmative defense depends on the jurisdiction and the defense.
The most well-known affirmative defense is self-defense. It generally entails the defendant acknowledging that she committed the alleged act, but arguing that it appeared to be necessary in order to defend herself from harm. An example is fighting off a mugger.
Some states may require defendants to prove self-defense by a "preponderance of the evidence," while others require them to simply raise a plausible basis for it, and the prosecution to disprove it beyond a reasonable doubt. (Preponderance of the evidence is the lowest evidentiary standard; it requires the party to prove that the fact in question is more likely than not to be true.)
Other affirmative defenses include duress, entrapment, insanity, and necessity. Again, whether the defendant carries the burden and what that burden entails depend on the defense and the jurisdiction. For instance, the defendant may have the responsibility of proving insanity by "clear and convincing evidence." (Clear and convincing evidence is a burden lying somewhere between preponderance of the evidence and beyond a reasonable doubt, requiring that the fact to be proved be highly probable or reasonably certain.)
Each state has its own rules and requirements related to evidence in a criminal proceeding. If you are facing criminal charges, you should consult an attorney who is experienced in the nuances and procedures in your state.