Praise be to Allaah.
You have to give them sincere advice (naseehah), advise them and urge them to repent. Cover their sins and do not inform the authorities about them or expose them. Help them to obey Allaah and His Messenger, and tell them that Allaah accepts the repentance of the one who repents. And warn them against going back to this sin, because Allaah says (interpretation of the meanings):
“The believers, men and women, are Awliyaa’ (helpers, supporters, friends, protectors) of one another; they enjoin (on the people) Al Ma‘roof (i.e. Islamic Monotheism and all that Islam orders one to do), and forbid (people) from Al Munkar (i.e. polytheism and disbelief of all kinds, and all that Islam has forbidden)” [al-Tawbah 9:71]
“By Al ‘Asr (the time).
Verily, man is in loss,
Except those who believe (in Islamic Monotheism) and do righteous good deeds, and recommend one another to the truth [i.e. order one another to perform all kinds of good deeds (Al Ma‘roof) which Allaah has ordained, and abstain from all kinds of sins and evil deeds (Al Munkar) which Allaah has forbidden], and recommend one another to patience”[al-‘Asr 103:1-3]
And the Prophet (peace and blessings of Allaah be upon him) said:
“Religion is naseehah (sincere advice)…”
And he (peace and blessings of Allaah be upon him) said:
“Whoever covers a Muslim’s (sins), Allaah will cover him (his sins) in this world and in the Hereafter.”
Both were narrated by Imaam Muslim in his Saheeh. And Allaah is the Source of strength.