The exception clause allows, but does not require divorce if a spouse is unfaithful (see also Matthew 19:9). Importantly, Jesus does not require death for the guilty person (see Deuteronomy 22:21–22).
The idea is that if a man divorces his wife for the wrong reasons, he forces her into adultery by making her remarry. This would violate the law.
he who marries a divorced woman: It is unclear if Jesus means any divorced woman or only those divorced without a valid reason (like unfaithfulness). Jewish divorce law assumed that legitimate divorces allowed remarriage.