refers to the terms on which a case is ended – a case dismissed with prejudice cannot generally be refiled in the same court or jurisdiction (though the dismissal can be appealed), a case dismissed without prejudice generally can be refiled if the plaintiff can repair whatever flaw existed in the original claim.
A dismissal without prejudice is now often called a “dismissal with leave to refile [the case.]”