Waswas (in Arabic وسوس) in Islam is a term for "whispers from Shaytan". When a Muslim has some thoughts against Islam, he disregards them as waswas - a voice of Shaytan.
Waswas in the Qur'an
The Arabic word وسوس (waswas) in various forms appears 5 times in the Qur'an.
The first two refer to the story of Adam and Eve. The fa- prefix means "but" or "then".
Then one time it's a persons soul which whispers. The tu- simply indicates present tense, 3rd person, feminine, singular verb.
And two times in a short sura 114. The al- indicates definite article (before a noun). The yu- indicates present tense, 3rd person, singular, masculine verb.
114:1 Say: I seek refuge in the Lord of men,
114:2 The King of men,
114:3 The god of men,
114:4 From the evil of the retreating whisperer (ٱلْوَسْوَاسِ, al-waswasi)
114:5 Who whispers (يُوَسْوِسُ, yuwaswisu) into the hearts of men,
114:6 From among the jinn and the men.
Tafsir Al-Jalalayn says that the "whisperer" in 114:4 is Satan:
From this we can conclude that the concept of waswas (Satan whispering into Muslim minds) is described in the Qur'an, so it is definitely a part of the Islamic doctrine.
Waswas in hadith
Muslims are forgiven thoughts against Islam (the "whispers from Satan") as long as they don't act upon them and keep silent:
Most of the whispers come from urinating in a place for bathing:
It was narrated from 'Abdullah bin Mughaffal that the Prophet (ﷺ) said:"None of you should urinate in the place where he bathes, for most Waswas (devilish whispers)  come from that."  I.e., with regard to whether the urine has soiled his body or not.
Satan runs away farting, then comes back and whispers into hearts of Muslims when they pray, so they don't know how many rakats they have done:
But when Muhammad forgets how many rakats he has done during prayer, it is because he is just a human being (and it doesn't seem to be a product of Satan whispers):
"Alqamah prayed five (rak'ahs) and was told about that. He said: 'Did I really do that?' I nodded yes. He said: 'What about you, O odd-eyed one?' I said: 'Yes'. So he prostrated twice, then he narrated to us from 'Abdullah that the Prophet (ﷺ) prayed five (rak'ahs), and the people whispered to one another, then they said to him: 'Has something been added the prayer?' He said: 'No.' So they told him, and he turned around and prostrated twice, then he said: 'I am only human; I forget as you forget.'"
Muhammad sprinkled water on his "private parts", so that he doesn't get whispers from Satan:
Soothsayers make accurate predictions thanks to hearing waswas:
Waswas is a sign of faith:
It is narrated on the authority of Abu Huraira that some people from amongst the Companions of the Apostle (ﷺ) came to him and said:Verily we perceive in our minds that which every one of us considers it too grave to express. He (the Holy Prophet) said: Do you really perceive it? They said: Yes. Upon this he remarked: That is the faith manifest.
In the waswas-avoiding philosophy, you don't gather all information and then make rational conclusions. You gather only information which is in line with Islam, and everything which is not in line with Islam (regardless if it's true and logical) is dismissed. This creates a confirmation bias in Muslim minds.
For example, when Muslims try to prove that Allah exists, they often try the creationist argument, that "the world exists, therefore somebody must have created it". And now the question "Who created Allah then?" destroys their argument. But their argument was in line with Islam and this counter-argument is against Islam, so the first one continues to be widely accepted, but the counter-argument is dismissed as "waswas":
Also, attacking the source of counter-arguments, instead of actually analyzing and refuting them is a logical ad hominem fallacy.
Also if Allah created everything, then he created waswas. If he created waswas to test Muslims whether they are good enough Muslims, then the whole concept stops making sense, because why would he test them, when he is all-knowing and already knows the results? As we can see, when we consider the waswas concept together with other Islamic concepts like all-knowingness and testing belivers, it all stops making sense.
The concept of waswas is a perfect method to keep people believing blindly in false information, because if their beliefs were false, they would never realize that, because everything which leads to the realization would be considered waswas.
Islamic treatment of waswas
When you search the web, you will find many Muslims trying to "cure" themselves from waswas . The basic treatment method is ruqya - exorcism. Verses from the Qur'an are recited on the "posessed" Muslim. There is also a possibility of self-ruqya , where Muslim tries to get rid of waswas by praying and reading the Qur'an (and other practices).
The waswas-avoiding behavior could probably be best described, in a secular way, as a psychological repression. A Muslim represses his "bad" thoughts. He pushes them out of his consciousness, into the unconscious mind. From the unconscious mind, the repressed thoughts might express themselves in dreams or as inner voices.
The therapy for psychological repression is basically the opposite of what "Islamic therapy" does. In Freud's psychotherapy, the psychotherapist re-introduces the repressed thoughts back into the conscious mind . The conscious mind then learns to live with the previously-repressed thoughts and so there is no more repression. While the Islamic treatment of waswas is trying to repress the "bad" thoughts so much that they become silent. Which is not possible, because repressed thoughts don't disappear. They only hide in the unconscious mind and there they still affect a person's behavior and cause psychological problems.
Islam commits a logical fallacy by claiming that all information that go against it are waswas (whispering from Satan). This waswas-avoiding philosophy creates close-minded Muslims, who are not able to realize Islam is false, because everything which leads to that realization is labeled as "waswas" and rejected.
The Islamic treatment of waswas via exorcism is not efficient. The easiest way to get rid of "waswas" is to leave Islam and realize that there is no "waswas" and doubts are just a natural part of how the human brain works.
- Just Google "waswas".
- Freud, Five Lectures p. 35