When a judge dismisses a civil case with prejudice the case is over and the plaintiff lost. The plaintiff cannot (unless he successfully appeals) file a lawsuit based on the same facts again. Sometimes a judge will dismiss one claim with prejudice but not the whole case. For example, let’s say a plaintiff sues a defendant for negligence and breach of contract. If the judge decides the negligence claim is meritless he could dismiss that portion of the lawsuit with prejudice. The plaintiff’s lawsuit based on breach of contract will continue.
In contrast, when a case is dismissed without prejudice the plaintiff will have another opportunity to sue the defendant. In the United States, judges will often give plaintiffs more than one chance before dismissing a case with prejudice.