Allah says (interpretation of the meaning):
“And those who invoke not any other ilaah (god) along with Allaah, nor kill such person as Allaah has forbidden, except for just cause, nor commit illegal sexual intercourse and whoever does this shall receive the punishment. The torment will be doubled to him on the Day of Resurrection, and he will abide therein in disgrace” [al-Furqaan 25:68-69]
“Except those who repent and believe (in Islamic Monotheism), and do righteous deeds; for those, Allah will change their sins into good deeds, and Allah is Oft-Forgiving, Most Merciful. And whosoever repents and does righteous good deeds; then verily, he repents towards Allah with true repentance” [al-Furqaan 25:70-71]
From the above verses, we learn that If the one who has committed zina repents to Allah, truly and sincerely, then Allah will forgive him or her, overlook the sin, and Allah will change their sins into good deeds.
If the person repents sincerely, then it becomes permissible for him or her to get married, after they have given up this sin.