I found a good article on this to that will InshaAllah(God Willing) answer your question.
What is Sin in Islam?
By Muhammad Jamaal ad-Deen ‘Abdul-Wahid
The Holy Last Messenger (s.a.s.) said:
“Righteousness is good morality and sin is that which causes discomfort (or pinches) within your soul and which you dislike people to become informed of.” [Sahih Muslim]
Sin is that aspect in a Muslim’s life in which he or she makes effort to abstain from at all costs. Allah warns all of mankind that everything mankind does in this world will be put before us on Yawmul-Qiyaama (The Day of Resurrection) in Surah al-Zilzal:
“And he who does an atom’s weight of good will see it. And he who does an atom’s weight of evil will see it.” [Holy Qur’an, 99:7-8]
Allah also warns mankind that the one whose bad deeds (sins) are heavy will be in Hell, as can be found in Surah al-Qari’ah. A Muslim’s strife is to live the life of a believer and separate from the likeness of the sinner, as Allah differentiates the Mu’min (believer) from the fasiq (sinner) in Surah As-Sajdah:
“Is he who is a believer like unto him who is a sinner? They are not alike! For those who believe and do righteous works, for them are Gardens of Retreat, a welcome (in reward) for what works they did. And as for those who do evil, their abode is the Fire. Whenever they wish to leave, they will be forced back into it, and it will be said to them: Taste the torment of the Fire which you used to reject.” [Holy Qur’an, 32:18-20]
It is clear that one must steer away from sin and do righteous acts. However uncertainty arises in the mind when referring to the subject of sin such as 1.) the difference between a sin and a mistake, 2.) Shaytaan’s (Satan) role in the commission of a sin, 3.) if one becomes removed from Islam due to committing a sin, and 4.) the major sins. The purpose of this essay is to provide concise answers to such inquiries, inSha’Allah.
Question: What is the difference between sin and mistakes? What role does Shaytaan, the accursed one, play in sin?
Fault means any action that takes place unintentionally and sin is with intention. For example, Shaytaan put such ideas into the heart of Hazrat Adam (a.s.) to approach the tree. Adam did it and as a result, Allah sent him to the earth. Similarly, Hazrat Yunus (Jonah) committed a fault and he adopted that way prohibited to him according to the instruction of Allah. Allah says in the Holy Qur’an that it was Shaytaan who put the idea into Hazrat Adam and Hazrat Yunus (a.s.), so there is no doubt that Shaytaan can put these ideas into the hearts of the Nabiyeen(Prophets) to divert their attention from the right way. But the mistakes they commit are only according to the Hikmat of Allah. These mistakes are below the standards of the Nabiyeen, so we can not point it out that they took place according to the Order of Allah. We must say Shaytaan is responsible. All the good things take place from the Kindness of Allah while all of the bad things are due to Shaytaan. The awliya are not free from this was-wâs (evil whispers), but if this was-wâs happens to any wali, as soon as he realizes it, he busies himself in tawba (repentance). But on the other hand, the common people, when they commit a sin, they do not realize it and they do not feel guilty about it.
Note: Sins are of three types:
Against Allah.
Against brotherhood.
Against humanity.
In Hadith, Hazrat Anas (r.a.) narrated that Rasulullah (s.a.s.) said Shaytaan travels through the body like blood.
Explanation by Imam Al-Bukhari and Imam Muslim: Allah gave full power to Shaytaan to put evil ideas into the hearts of men. If a man does not act upon these ideas, he has passed the worldly examination and will get a high place in Jinnah (Heaven). When we say that the Shaytaan travels through the body like blood, it means not physically but according to his evil ideas or thinking there are things that travel like the human blood.
In Hadith Hazrat Imam Abu Hanifah (r.a.) related that the Nabi (s.a.s.) said:
“The was-wâs that enters the hearts of my ummah Allah has forgiven, as long as they don’t act upon or voice it.” [Imam Al-Bukhari and Imam Muslim agree on it]
Tafsir (Commentary): Was-wâs is the bad intentions that enters one’s heart. And those good intentions that enter one’s heart is called ilham. The ilham won’t be accepted unless it is accordance with the Holy Qur’an and Hadith. Bad thoughts by a person that is not related to aqeeda (belief), and doesn’t act on them, for him is Maafoo (forgiveness). If vice versa is related to kufr (disbelief), then it will be kufr. And if related to dhal (straying away), then it will be dhalleen. For both of these situations, tawba is fardh (obligatory). If this intention is related to any actions and not aqa’id (belief), and he keeps this intention in his heart, then he is a sinner.
Question: Does the commission of sin remove one from Islam?
Hazrat Anas bin Malik relates Rasulullah said that three things form the foundation of Al-Islam.
1.) Whosoever says Laa ilaaha illAllah, Muhammadur-Rasulullah (There is none worthy of worship, but Allah, Muhammad is His Messenger), do not take him out of Al-Islam because he committed a sin.
2.) From the time I was sent as Nabi, Jihad will continue until the last person of this ummah wages war against the dajjal, and the rule of a tyrant and the justice of a just ruler can not abrogate this.
3.) To accept the taqdir(Divine Will) of Allah. [Sahih of Abu Dawud]
Tafsir: Ahlus-Sunnah (The People of the Sunnah, or traditions & practice of the Holy Nabi Muhammad, may Allah’s Peace and Blessings be upon him.) does not remove someone from Al-Islam because he committed a sin, but the Khariji say the person becomes a kafir (disbeliever). The Mu’tazila say the person will be out of Islam, but still be Muslim. If a person commits such an act which is a sign of kafir (wearing crosses, sajda to idols, etc.) then he will be out of Islam, but if someone says something that has one hundred meanings and ninety-nine are kafir and one is Islam, then we must take the one meaning unless he’s referring to any of the ninety-nine.
Question: What other kinds of sin are there, and how are they forgiven?
Kabirat is that which Shari’ah has strictly forbidden. And the punishment for that in this dunya is haad or ta’zirat or the punishment will come in Akheel. Kabirat pertains to that which is not forgiven, until a person makes tawba (repentance). Gumara sajira, or it’s called tharaba sajira, is forgiven through practicing of good deeds. If one commits tharaba sajira continuously, it becomes tharaba kabira. There are four kinds of tharuba (sins).
1.) That which will not be forgiven without tawba(Sincere Repentance). Commission of this sin is like a kafir.
2.) That sin which has a possibility of being forgiven by tawba or by good deeds. These are tharaba sagina.
3.) Those sins for which tawba is necessary, but, if Allah wills, he can forgive without tawba. This is tharaba kabira, but it is tharab that transgress the rights of Allah.
4.) The tharab kabira that are connected to the rights of the society, other people. For forgiveness, it is necessary to make tawba and then restore the rights to that person and ask his forgiveness, and on conditions that he forgives you. This does not pertain exclusively to wealth. If one does not ask for forgiveness and is not forgiven, then on Yawmul-Qiyaama, the one whose rights have been transgressed will be given the good deeds of the transgressor as much as he pleases in accordance with justice. Or else the sins of the oppressed will be given to the transgressor according to justice. Allah may, of His own will, make the oppressed happy and show Mercy to the dhalameen (oppressor).
Hadith: Hazrat Abdullah bin Mas’ud narrates that a person asked Rasulullah (s.a.s.), “Ya Rasulullah, according to Allah, which is the greatest sin?” Rasulullah (s.a.s.) answered, “To associate partners with Allah (known as shirk), while He has created you.” Then he was asked, “Which is the biggest sin after that?” And he (s.a.s.) said, “To kill your offspring because he will eat with you.” Then he was asked “Which is the greatest after that,” and he said, “To make zinna (fornication) with your neighbor’s wife.”
As can be seen from the evidence provided, sin is a very major issue in the life of a Muslim. A Muslim strives to gain the pleasure of Allah and abstains from that which incurs the wrath of Allah. A Muslim begs Allah for His Guidance each and every time he or she performs Salaat (the ritual form of prayer a Muslim is commanded to perform five times a day), by reciting the last three ayats of Surah al-Fatiha (the opening Surah of the Holy Qur’an):
“(We beg of you to) Guide us in the Straight Path. The path of those whom You have favored. Not of those who have earned Your anger, and nor of those who have gone astray.”
Allah shows the Muslim the prayer for seeking His Guidance and avoiding His Wrath. The Mu’min is one who fully adheres to the Shari’ah and earns the Pleasure of Allah, thus steering away from sin at all costs. Al-Gawth Al-A’zam Shaykh Muhyyuddin ‘Abdul-Qadir al-Jilani (r.a.) has given many discourses on securing this path, and in Futuh Al-Ghaib (The Revelations of the Unseen), he states in the very first discourse:
Three things are indispensable for a believer in all conditions of life: he should keep the Commandments of Allah; he should abstain from the haraam (forbidden); and he should be pleased with the decree of Providence. Thus the least that is expected of a believer is that he should be without these three things. So it is meant that he should make up his mind for this and talk to himself about this and keep his organs engaged in this.
In conclusion, one sees that there exists a distinct difference between sin and mistakes. One should distinguish between the two and be aware of what his or her niyyat (intention) is before proceeding with an action. The Holy Last Messenger (s.a.s.) “Actions are but by intentions and every man will have but that which he intended.” It is best that one proceeds with the intention of pleasing Allah, and doing an action for Allah’s sake. Major sins are those sins in which a Muslim would never imagine of doing under any circumstances, but if committed, tawba would be performed immediately. One’s sins do not remove him or her from Islam unless he or she commits an act of kafir, unless their belief removes one from Islam. Allah says: “If I were to punish everyone for their sins, then NOTHING would remain in existence.” The worst sin anyone could ever commit is to ascribe partners with Allah, and this is known as shirk.
The evil which man does is either by his nafs (the unruly self which causes man to act irreligiously and cause his own harm) or Shaytaan. Allah is not happy with evil or bad deeds, and good deeds make Allah happy. And good is done by the help of Allah, but Allah only helps who desires good and puts forth effort. May Allah guide us all and forgive the sins of the past and the present and protect us from future sins. Aameen!