The prohibition against double jeopardy prevents the government from trying a defendant more than once for the same crime. But determining when a defendant has been placed in "jeopardy" can be difficult. In many cases, the prosecution can drop charges through dismissal or nolle prosequi before jeopardy has “attached,” then later refile them.
The empaneling of a jury (selecting a jury and swearing in its members), typically connotes the attachment of jeopardy—if the defendant isn’t subsequently convicted, the prosecution can’t try her or him a second time. There are exceptions, however, such as where a mistrial or hung jury occurs—in those instances, retrial is usually allowed.
But in many instances the prosecution can’t retry a defendant if it has dropped charges after jury selection. In others, prosecutors can refile, but the defense’s agreement or the court’s approval is necessary for dismissal.