Ne bis in idem is a legal principle in (german) criminal law. It directly translates to “not twice in the same (offense)”.
It means that no person can be tried or punished twice for the same offence.
People who have been convicted cannot be tried for the same offence again.
This legal principle does not stop higher courts from ordering a retrial after an appeal.
While exceptions to this principle exist they are rare (e.g. faking of evidence, confession of perpetrator after trial, procedural errors).
Similar rules exist in e.g. the US or the UK (double jeopardy).