Duress refers to a situation where an individual commits a crime because they are under immediate threat or coercion, while necessity involves committing a crime to prevent a greater harm from occurring. Both concepts serve as defenses in criminal law, but they differ significantly in their applications and the circumstances under which they arise. Understanding these distinctions is crucial for analyzing cases where individuals may be compelled to break the law under pressure or to avert a more serious consequence.