The sins that people commit are not all alike in terms of their greatness and the forgiveness of different sins depends on the kind of sin that has been committed. Some sins can be forgiven by only saying astaghfurullah once while others may require more effort. We must note that according to Islam, anyone can repent to Allah up until the last moment of his life, and in order to do so, after asking for the help of Allah and the Ahlul-Bayt, he must make great effort to compensate for the rights he trampled in regard to Allah and people.
First we will mention the viewpoint of Islamic scholars about categorizing sins in the two categories of small and major sins, and then we will explain the things that help us to efface the effects of sins from our lives.
In Islamic texts, there are three opinions in regard to major sins that we will mention due to the role they play in answering the abovementioned question.
First: Major sins are sins that their committer has been directly promised to be sent to hell.
Second: A major sin is one which its impermissibility is understood from a decisive verse or hadith.
Third: According to the ahadith, all sins are major ones when considering the greatness of Allah, and it is only when compared with each other that some are seen to be small.
For more information in this regard refer to “ Forgiveness of sins, question 11512 (website: 11351)”.
It is explained in Islamic teachings that what is detrimental and devastating to man’s life is disobeying divine commands and turning to sins that have been promised harsh punishments for in the Quran and ahadith. However, the point that we must pay attention to is that one can change the course he has taken when he has realized the bad effects of sins in the different fields of his social and personal life, because in Islam there is no dead end, meaning that under any circumstances one can change his fate.
The ways of eliminating effects of sins
The elimination of the effects of sins through carrying out good deeds is referred to as “Takfir”. Knowing that there are many of these good acts, it will suffice to mention a few of them below
1- Doing Wajib and Mustahab prayers: In the Quran Allah says: “وَ أَقِمِ الصَّلاةَ طَرَفَیِ النَّهارِ، وَ زُلَفاً مِنَ اللَّیْلِ، إِنَّ الْحَسَناتِ یُذْهِبْنَ السَّیِّئات”  “Maintain the prayer at the two ends of the day, and during the early hours of the night. Indeed good deeds efface misdeeds. That is an admonition for the mindful.”
2- Istighfar (asking for forgiveness): One of the things that can eliminate sins is performing Istighfar that has been mentioned in many ahadith. Imam Sadiq says: When one commits a sin he is granted time from the morning till night, if he does Istighfar then his mistake will be overlooked. 
He also states in another hadith: “... He is granted seven hours, if he repents from what he did, they will not write anything for him, and if the seven hours pass and he does not repent, then they will write down his sin.” The Imam continues: “Sometimes a believer remembers his sin after twenty years, but a disbeliever may forget his sin the moment he commits it.”  and it is mentioned in another hadith from one of the infallibles that: “Every sickness (problem) has a medicine and the medicine of sins is Istighfar .” 
The point we must keep in mind in regard to using Istighfar to eliminate the effects of sins is that the meaning of Istighfar is not simply verbalizing “استغفر الله” so that one can trample the rights of people and Allah during the day and have his sins forgiven by just saying this phrase. In fact, verbally expressing Istighfar and acting against it can have negative effects.
Imam Reza says: “One, who verbally expresses Istighfar but does not regret his acts in his heart, has mocked himself.  ”
3- Saying Salawat: One of the things that efface sins is reciting Salawat as much as possible. Imam Reza says: “One who does not have the ability to do things that will lead to his forgiveness should say Salawat for the prophet and his household, for this will eliminate his bad deeds.” 
Now we will mention some of the many other acts that efface sins:
Fasting the month of Sha’ban  , helping the oppressed and solving a believer’s problem  , being sad because of death  , going to the mosque to carry out prayer after the Adhan is said by the Moadhen (One who says the Adhan)  , reciting Quran  , crying for the hardships of Imam Hussein  , making Ziyarat of the grave of the prophet and his household  , looking at the house of Allah (The Ka’abah)  , staying away from sin when alone because of being aware of Allah  , making effort to fulfill the needs of a sick believer  , fasting the month of Ramadhan and controlling the stomach, tongue and sexual desire during this month. 
 Kuleini, Muhammad bin Ya’qub, Kāfī, vol. 2, pg. 437, hadith 1, Daar al-Kutub al-Islamiyyah Publications, Tehran, 1365 (solar calendar).
 Ibid, hadith 3.
 Ibid, pg. 439, hadith 8.
 Majlsi, Muhammad Baqir, Bihar al-Anwar, vol. 75, pg. 356, hadith 11, Al-Wafa Insititute, Beirut, 1404 AH.
 Ibid, vol. 91, pg. 48, hadith 2.
 Ibid, vol. 4, pg. 91, hadith 5.
 Ibid, vol. 75, pg. 68, hadith 5.
 Ibid, vol. 73, pg. 16.
 Ibid, vol. 81, pg. 154.
 Ibid, vol. 89, pg. 17, hadith 18.
 Ibid, vol. 44, pg. 283, hadith 17.
 Saduq, Muhammad bin Ali, Man La Yahduruhu al-Faqih, vol. 2, pg. 577, book of performing ziyarat of the prophet and imams, Jame’eye Mudarresin Publications, Qom, 1413 AH.
 Ibid, vol. 2, pg. 204, hadith 2142.
 Ibid, vol. 4, pg. 412, hadith 5895.
 Ibid, vol. 4, pg. 15.
 Bihar al-Anwar, vol. 93, pg. 371, hadith 55.