Repentance is to  sincerely return back to Allah after straying from His path by disobeying Him. Disobedience is a sin and sins are categorized into major and minor sins based on their grievous consequences.

Sincere repentance covers and expiates both. Illicit sexual practices, neglecting prayer and fasting etc. are major sins. However, no major sin withstands genuine repentance. In fact, whoever returns to Allah with heartfelt repentance becomes as pure as the one who has never committed a sin. However, this return involves the following three basic steps:

a. to feel deep regret for disobeying Allah

b. to give up disobedience;

c. and to resolve not to return to that sin evermore.

One more condition to be mentioned is that if the sin one has committed involves taking someone else’s rights or properties, he has to give these rights and properties back to their due possessors.

Between man and his Lord, this sincere repentance is purely an act of his heart. Repentance is just like Islam itself in terms of wiping out all previous sins. As we all are human beings and are weak enough to frequently fall in sins, a Muslim has to constantly refresh and renew his repentance for whatever he has done.

Allah says in the Qur’an: “Say: ‘O my Servants who have transgressed against their souls! Despair not of the Mercy of Allah: for Allah forgives all sins: for He is Oft-Forgiving, Most Merciful.'” (Az-Zumar: 53) “Allah accepts the repentance of those who do evil in ignorance and repent soon afterwards; to them will Allah turn in mercy: For Allah is full of knowledge and wisdom.” (An-Nisa’: 17)

Sometimes Satan tries to trick the repentant by heaping doubts on them and trying to make them despair of Allah’s mercy. Never pay attention to these whispers and thoughts. What is gone is gone. Allah welcomes those who return to Him and never lets down those who repent sincerely and seek His forgiveness.

Abu Musa Al-Ash`ari (May Allah be pleased with him) reported: The Prophet (peace and blessings be upon him) said: “Allah, the Exalted, will continue to stretch out His Hand in the night so that the sinners of the day may repent, and continue to stretch His Hand in the daytime so that the sinners of the night may repent, until the sun rises from the west“. [Muslim].

Abu Hurairah  (May Allah be pleased with him) narrated: Messenger of Allah (peace and blessings be upon him) said, “He who repents before the sun rises from the west, Allah will forgive him“. [Muslim].

Anas ibn Malik Al-Ansari (May Allah be pleased with him) the servant of the Messenger of Allah narrated that Messenger of Allah (peace and blessings be upon him) said, “Verily, Allah is more delighted with the repentance of His slave than a person who lost his camel in a desert land and then finds it (unexpectedly)“.

Therefore, any verse or hadith implying that some people’s repentance will not be accepted is understood to mean those people who are too involved and absorbed in disbelief to turn to Allah and thus, they will not be guided to repent.