A crime is an action that is considered to be wrong and punishable by law.
Punishment is the infliction of a penalty to ensure that the law is enforced.