All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is well established in the Sharee’ah that Zina (fornication or adultery –but in this case it is adultery since they are married) is a great sin and it is among the major sins. Allah Says (what means): {And do not approach unlawful sexual intercourse. Indeed, it is ever an immorality and is evil as a way.} [Quran 17: 32]
So, anybody who commits such an evil act should repent from it.
The answer to your question depends on one of three situations:
First, if the couple got married after having (both) repented from Zina, in this case the marriage is valid.
Second, if the marriage act was concluded before any of the parties repented from Zina, then the marriage is invalid according to the majority of scholars. So, the husband has to divorce her and there is no objection to him marrying her again with a new contract if they both repent from this sin.
Third, if Zina happened after the marriage contract was established, then this has no effect on the continuity of conjugal life. But the husband must not have sex with her until she has menses (one monthly period) or gives birth if she got pregnant from that Zina.
Allah knows best.