Hadith #9

"Regret is repentance.” الندم توبة

Although pure and free from sin, our prophet used to repent and ask for Allah's forgiveness 100 times or more every day, and he commanded his companions to do the same. This shows the importance of repentance.

The prophet also taught us in a narration of Abu Hurayra that: "Whoever sits in a gathering and indulges in useless talk, and before getting up supplicates: Subhanaka Allahumma wa bihamdika, ashhadu an la ilaha illa Anta, astaghfiruka wa atubu ilaika (O Allah, You are free from every imperfection; praise be to You. I testify that there is no true god except You; I ask Your forgiveness and turn to You in repentance), he will be forgiven for (the sins he may have intentionally or unintentionally committed) in that assembly.'' In fact it's recommended to say this dua even if the gathering is for useful and clean talk.

Some conditions must be fulfilled in the process of repenting. It should all start with a person acknowledging his mistake. The second condition is to feel regret and to blame himself. He should then proceed to actions by quitting the sin with a sincere intention to never return to it. Finally, he should try to fix any damage that may have been caused by his mistake.

The only time repentance is rejected is when the angel of death visits us. Since the time of this visit is unknown to us, it's highly recommended to not delay repentance.