In The Name of Allaah, The Most Merciful, The Bestower of Mercy.
Allaah [The Most High] said that Aadam and Hawwaa [alayhimas salaam] said: [رَبَّنَا ظَلَمۡنَآ أَنفُسَنَا وَإِن لَّمۡ تَغۡفِرۡ لَنَا وَتَرۡحَمۡنَا لَنَكُونَنَّ مِنَ ٱلۡخَـٰسِرِينَ – Our Lord! We have wronged ourselves. If You forgive us not, and bestow not upon us Your Mercy, we shall certainly be of the losers]- Meaning: Indeed, we committed the sin You forbade us from committing; we have harmed ourselves by committing the sin and have fallen into that which is a cause of loss unless you forgive us, wipe away the consequences of the sin and the punishment attached to it; grant us mercy by accepting our repentance and [free us from the calamity, harms etc] of the likes of these mistakes. So, Allaah forgave them just as Allaah stated:
وَعَصَىٰٓ ءَادَمُ رَبَّهُ ۥ فَغَوَىٰ
ثُمَّ ٱجۡتَبَـٰهُ رَبُّهُ ۥ فَتَابَ عَلَيۡهِ وَهَدَىٰ
Thus did Adam disobey his Lord, so he went astray. Then his Lord chose him, and turned to him with forgiveness, and gave him guidance. [Surah Tahaa. Aayaat 21-22]
Aadam attained success through five affairs: Acknowledgement of his sin, showed regret, blamed himself, hasten towards repentance and did not lose hope in Allaah’s Mercy. And Iblees was condemned to wretchedness through five affairs: He did not acknowledge his sin, he was not regretful, he did not blame himself, rather he blamed his Lord; he did not repent and he lost hope in Allaah’s Mercy. [Fiqhul Ad’iyah Wal adkaar vol 4/343-346]