The prohibition against double jeopardy bars the government from prosecuting the same person for the same offense more than once. For the most part, a defendant has technically been placed in jeopardy—that is, jeopardy has “attached”—at the moment the jury is sworn in.
But the empanelling of a jury—selecting it and swearing in its members—doesn’t actually mean that, whatever happens, the defendant can’t be retried. Of course, if the jury acquits or convicts the defendant, the government can’t re-prosecute, unless an appellate court later overturns the judgment. (Retrial sometimes isn’t allowed, such as when an appeals court decides that the evidence was insufficient to convict the defendant.)
Criminal trials often end in something other than acquittal or conviction. There may be a mistrial because of jury misconduct, for example, or the jury may “hang,” meaning that its members can’t agree on a verdict. In these kinds of scenarios, even though a jury has already been sworn in and jeopardy has thereby attached, retrial is usually allowed. There are exceptions that can prevent retrial—for instance, severe misconduct by a prosecutor intended to create a mistrial. But, in lots of cases, the swearing in of the jury isn’t the actual point of no return.
For information on the ins and outs of the double jeopardy principle, see The Prohibition Against Double Jeopardy. And to understand why a state and the federal government can prosecute the same person for the same act, see State vs. Federal Prosecution.