There are many ways mentioned below that one can be forgiven and purified from his sins and misdeeds:
1- Repenting according to its conditions and returning to Allah.
2- Doing extraordinary good deeds that cause the forgiveness of evil deeds.
3- Avoiding major sins which entails the forgiveness of minor sins.
4- Enduring the difficulties and catastrophes of this world, the hardships of Barzakh (the barrier between the mortal world and the hereafter) and the initial stages of the Day of Judgment will purify believers.
5- Intercession: Of course we must pay attention that Intercession will only purify a sinner from his bad deeds if he makes the required changes and possesses the qualifications of being forgiven.
6- Divine Forgiveness: It will only apply to people who possess the required qualifications and conditions; meaning that it covers the believers who had practical shortcomings and faults.
It is understood from numerous Quranic verses that there are many ways of being forgiven for misdeeds that we will briefly mention below:
1- Repenting and returning to Allah along with remorse and regret for previous sins and deciding not to return to them in the future as well as compensating for misdeeds through committing good deeds. There are many verses that have this message, but we will only mention one:
"هُوَ الَّذِی یَقْبَلُ التَّوْبَةَ عَنْ عِبادِهِ وَ یَعْفُوا عَنِ السَّیِّئاتِ" "It is He who accepts the repentance of His servants, and excuses their misdeeds."
The truth of repentance is to have remorse and regret for committing sins and this entails the decision to avoid sins in the future and compensate for those that can be made up for. Saying 'Istiqfar' is a verbalization of such a decision and regret. In this light the fundamental elements of repentance in brief are as follows: 1- Avoiding sins 2- Having remorse and regret 3- Deciding not to return to sins in the future 4- Compensating for the past 5- Istiqfar
2- Doing extraordinary good deeds that cause the forgiveness of previous misdeeds. In this regard the Quran says: " إِنَّ الْحَسَناتِ یُذْهِبْنَ السَّیِّئاتِ " " Indeed good deeds efface misdeeds"
3- Avoiding major sins which entails the forgiveness of minor sins: " إِنْ تَجْتَنِبُوا کَبائِرَ ما تُنْهَوْنَ عَنْهُ نُکَفِّرْ عَنْکُمْ سَیِّئاتِکُمْ وَ نُدْخِلْکُمْ مُدْخَلاً کَریماً " " If you avoid the major sins that you are forbidden, We will absolve you of your misdeeds, and admit you to a noble abode."
4- Enduring and tolerating the difficulties and catastrophes of this world reduces the punishment of a believer and the hardships of Barzakh and the initial stages of the Day of Judgment, purifying him from evil deeds.
5- Intercession; the essence of intercession is the attachment of a greater being to a weaker one in order to help it. This assistance could mean enhancing the positive points or compensating for the weak points.
From the viewpoint of Islam and the Quran, the concept of intercession revolves around the change of the person that is being interceded for; meaning that through a relationship with the intercessor, the person changes his current status that entails punishment, into a satisfying status that makes him qualified and worthy of forgiveness.
Believing in this type of intercession is actually a great mechanism for spiritual growth and change for sinners and wrongdoers and entails their awakening and awareness.
According to many ahadith""المقام المحمود that has been promised to the prophet in the Quran, is the rank of intercession " و لسوف یعطیک ربک فترضی" And soon will thy Guardian-Lord give thee (that wherewith) thou shall be well- pleased.", also this verse mentions Allah's forgiveness, which through the intercession of the prophet, covers those who possess the qualifications of being forgiven.
Therefore intercession is the greatest and final hope of sinful believersm, and this type of intercession that is Islam promotes is one of the greatest mechanisms of causing positive change and hope for making up for one’s faults, purifying oneself from sins and moving towards spiritual values.
6- Divine Forgiveness that applies to people who are qualified; meaning the believers that have had faults and committed sins. If they are qualified to be forgiven by Allah, they will enter paradise and if not they will temporarily be punished in hell, but will not stay there forever.
Once again we must note that Allah's forgiveness depends on his will and therefore it is not an unconditional matter that covers all people, in fact it only covers those who have somehow shown in practice that they are worthy of forgiveness.
Therefore, Allah, who has created human beings and knows about all aspects of their lives, has considered it possible for one to be purified from all sins (even if they are major sins) and has called all people to his forgiveness. He has promised to forgive them to the extent that he has considered giving up hope in his mercy and forgiveness as the greatest sin. Allah's prophets were sent to guide people to his unlimited mercy and forgiveness to the extent that the holy prophet of Islam was known as the prophet of mercy and was given the title Prophet of mercy.
The point that we stress on in closing is that if a believer maintains his belief and faith until his death and does not commit certain sins that will entail deprivation of succeeding in other good deeds and total misguidance and doubting or denying and rejecting the truth, and in other words dies as a believer, he will not be punished in hell forever. His minor sins will be forgiven because of avoiding major sins and his major sins can be forgiven through complete and accepted repentance. If he does not have the chance to repent in the mentioned manner, enduring and tolerating the difficulties and catastrophes of this world will reduce his punishment and the hardships of Barzakh and the initial stages of the Day of Judgment will purify him from his sins, and if he is still not purified, he will be saved from hell through intercession, which is the greatest and most comprehensive manifestation of Allah's mercy through his pious servants and especially the prophet and his household. But at the same time he must not feel totally safe from Allah's "Makr" (Scheme) and he must always be careful and see if he has done or will do anything that will entail total misguidance at the moment of death. Also, one should be alert not to let the love and affections for this world enter his heart to the extent that he leaves this world, he is subject to Allah's wrath.
 Tafsir Nemouneh, vol. 24, pg. 290.
 Misbah Yazdi, Mohammad Taqi, Amuzesh Aqa’ed, pg. 477.
 Amuzesh Aqa’ed, pg. 481.
 For further information, see: The concept of intercession in Islam, Question 350, and Intercession and divine consent, Question 124.
 Sajdah:4, Zumar:44, Baqarah:255, Saba’:23….
 Tafsir Nemouneh, vol. 1, pg. 233.
 Tafsir Nemouneh, vol. 26, pg. 111.
 Amuzesh Aqa’ed, pp. 481 and 482.