The Fifth Amendment to the Constitution states that no person can be placed twice in jeopardy of life and limb. Most courts have held that jeopardy attaches when a trial jury is empanelled. For that reason, if a person has been charged with a crime but a Grand Jury refuses to indict, he may be re-charged and re-indicted. By the same token, if one is freed following a preliminary hearing, the prosecutor may refile charges against him without fear of violating the 5th Amendment. On another note, if a defendant is convicted of a criminal offense and his conviction is overturned either by the trial judge or an appellate court, he can be retried. If however a trial jury has been seated and sworn, the defendant is at that moment in jeopardy of conviction. If a verdict of not guilty is returned there is no appeal by the prosecution; the matter is effectively ended, even if the defendant later publicly reveals his guilt.
It is for this reason that, if one is charged with multiple counts of criminal activity, say murder, the prosecutor may elect to try him on a single count. If the defendant is found not guilty of that single count, the prosecutor may bring additional charges for the other counts.