The first is that he must immediately cease the sin.
The second is that he must feel remorse for having committed it.
The third is that he must resolve never to return to it for the rest of his life. If any one of these three is missing, his repentance is not valid.
If the sin involves the right of another person, then the conditions become four: these three, plus clearing himself of the other party’s claim. If the wrong concerns property or the like, he must restore it to its owner. If it concerns a fixed legal penalty for slander (ḥadd al-qadhf) or the like, he must submit himself to the penalty or seek the offended person’s pardon. If it is backbiting, he must obtain his forgiveness for it. (1)
A person is required to repent of every sin; if he repents of only some of them, his repentance regarding those particular sins is sound in the view of the people of truth, but the remainder still rests upon him. The proofs found in the Scripture, the Sunnah, and the consensus of the Ummah have all converged to establish that repentance is an obligation.
Allah Most High says: “And all of you, O believers, turn to Allah in repentance so that you may succeed.” (Quran 24:31) He says: “Seek forgiveness from your Lord, then turn to Him in repentance.” (Quran 11:3) And He says: “O you who believe, turn to Allah with a sincere repentance.” (Quran 66:8)