There are many ways to receive forgiveness and pardon. We will mention a few of them here:
1. Repentance and rededicating oneself to the path of God (contingent upon its conditions).
2. Doing outstanding good deeds which cause forgiveness of sins.
3. Abstaining from the cardinal sins; this in turn results in the forgiveness of the lesser sins.
4. Tolerating the tribulations and misfortunes of this world, difficulty of the inter-world (Barzakh), and the initial trials of the Day of Judgment will help to eradicate one’s sins.
5. Intercession. Of course it must be taken into consideration that intercession is contingent upon the change and transformation of the sinner from his previous state and his having the necessary capacity for forgiveness and remission; in order for him to become cleansed from sins.
6. Divine forgiveness for individuals who are worthy and have met the necessary conditions; meaning for the “believers” (Mu’mineen) who have had some shortcomings or incompetence in their actions.
From numerous verses of the Holy Quran we can gather that there are various ways of attaining forgiveness and pardon of sin; of which here we will briefly mention some of them:
1. Repentance and rededicating oneself to the way of Allah, with sincere regret for past sins with a firm decision to refrain from future sin and practical compensation of bad deeds by doing good deeds. There are a number of Quranic verses which convey this, but in order to maintain brevity we will only mention one here:
It is He who accepts the repentance of His servants, and excuses their misdeeds and knows what you do. 
The genuineness of repentance lies in regret and remorse which necessitates a serious decision not to commit that sin again in the future, and of course compensation for those deeds (if possible). The same rule applies to saying “Astaghfirullah” (I seek forgiveness from Allah). Hence, the pillars of repentance can be summarized as five things: 1. no longer committing that sin 2. remorse 3. Decision not to repeat that sin in the future 4. Compensation of the past 5. Repentance. 
2. Doing extraordinary good deeds which cause forgiveness of bad deeds. Just as it states in the Quran:
Maintain the prayer at the two ends of the day, and during the early hours of the night. Indeed good deeds efface misdeeds. 
3. Abstaining from cardinal sins, which in turn cause the lesser sins to be forgiven.
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-5]
4. Tolerating the tribulations and misfortunes of this world will lighten the burden of sins of the believers; just as the affliction in the inter-world (Barzakh), and the initial trials of the Day of Judgment will help to eradicate his misdeeds. 
5. Intercession: intercession is the complement of an elevated being toward a weaker being in order to help him. This could be to increase the strong points or to lessen the weak points. The concept of intercession from an Islamic and Quranic  standpoint revolves around the principle of change, transformation and amendment of the “interceded individual” this means that the person who is being interceded sets the groundwork and preparation so that he may prevent an undesirable chastisement; and by means of the interceder he puts himself in a more desirable position to receive and be worthy of forgiveness and clemency. Believing in this type of intercession, in actuality is a supreme level of soul-cultivation by which sinners can become amended and made more conscious.  According to the numerous traditions of “Maqam Mahmoud” (the rank of the praised one) which has been promised to the Noble Prophet (s) in the Holy Quran is the rank of intercession. The following Quranic verse indicates that divine pardon will transpire via Hazrat Muhammad (s) for those individuals who are worthy and deserving of it. Therefore, the greatest and final hope for sinning believers is intercession. From Islam’s view, intercession (along with its requirements) is one of the methods of graciousness and creating hope with the purpose of compensating for the shortcomings of a believer in order for him to become cleansed from sin and to exalt and elevate his position.
6. Divine forgiveness  is inclusive of worthy individuals; meaning the believers who, in their actions have had some shortcomings or have been contaminated with misdeeds. If these individuals are embraced by divine pardon then they will join those going to heaven, and if not then they will enter into the hellfire; however that will not remain their [permanent] place and station and they shall not be abandoned there forever. 
It should be reiterated that divine pardon/forgiveness is contingent upon His ordinance, and it is not just a general matter with no conditions or stipulations. His will and ordinance will only merge with those deserving individuals who have in some way proven their worth by their actions.
Therefore Allah, The Most High who is the creator of man and who is completely aware of his state of affairs, has recognized it as possible for one to become cleansed from all sins (even the cardinal sins), and He has invited everyone to reach that position and has given the promise of forgiveness, and has even considered hopelessness from divine pardon and clemency as the greatest sin. All of the divine prophets have been chosen by God to help people to reach the vast ocean of divine mercy; to the extent that the dear Prophet of Islam has been called the “Prophet of Mercy”.]
The point which we will expound on again here in conclusion is that if a believer maintains his faith until the time of his death and he does not commit any sins that would cause his downfall or misfortune, nor at his death does he die with doubt or disbelief – in other words if he dies with “Iman” (Belief); then he will not incur eternal punishment. His lesser sins will be pardoned by his abstaining from the cardinal sins and his cardinal sins will be pardoned by making complete and acceptable repentance. And if [for some reason] he never becomes successful in making such a repentance, then by tolerating the difficulties and tribulations of this world, and the severity of the inter-world, and the initial trials of the Day of Judgment, his sins will be exonerated. And if he were to still be contaminated by sins, then he may be saved from the punishment of the hellfire by means of intercession -the greatest and most vast manifestation of divine mercy which has been bestowed upon God’s Elite Saints, especially the Noble Messenger and his Noble Progeny (Peace and blessing be upon them). Nevertheless, at the same time one should never feel completely safe from “Allah’s scheme”, and they should always have fear that, lest they may have or will do something which will cause them misfortune or loss of faith during their time of death. And God-forbid the love of worldly things reaches a point where it infiltrates their heart, and they leave this world while subject to Allah the Most High’s abhorrence .
 Sura Shura – Verse 25
وَهُوَ الَّذِي يَقْبَلُ التَّوْبَةَ عَنْ عِبَادِهِ وَيَعْفُو عَنِ السَّيِّئَاتِ وَيَعْلَمُ مَا تَفْعَلُونَ
 Nemuneh Tafsir – Volume 24, p. 290
 Sura Hud – Verse 114
وَأَقِمِ الصَّلاَةَ طَرَفَيِ النَّهَارِ وَزُلَفًا مِّنَ اللَّيْلِ إِنَّ الْحَسَنَاتِ يُذْهِبْنَ السَّـيِّئَاتِ ذَلِکَ ذِکْرَى لِلذَّاکِرِينَ
 Sura Nisa – Verse 31
إِن تَجْتَنِبُواْ کَبَآئِرَ مَا تُنْهَوْنَ عَنْهُ نُکَفِّرْ عَنکُمْ سَيِّئَاتِکُمْ وَنُدْخِلْکُم مُّدْخَلاً کَرِيمًا
 The study of Beliefs: Ayatollah Misbah Yazdi – p. 477
 The study of Beliefs: Ayatollah Misbah Yazdi – p. 481
 Sura Sajdeh – Verse 4; Sura Zumar – Verse 24; Sura Baqareh – Verse 255; Sura Saba – Verse 23&…
 Nemuneh Tafsir – Volume 1, p. 233
 Sura Shura – Verse 25
 Nemuneh Tafsir – Volume 26, p. 111
 The study of Beliefs: Ayatollah Misbah Yazdi – pp. 481 & 482