A young man enters a public place—a school, a shopping mall, an airport—carrying a small arsenal. He begins killing people at random. He has no demands, and no one is spared. Eventually, the police arrive, and after an excruciating delay as they marshal their forces, the young man is brought down.

This has happened many times, and it will happen again. After each of these crimes, we lose our innocence—but then innocence magically returns. In the aftermath of horror, we seem to learn nothing of value. Indeed, many of us remain committed to denying the one thing of value that is there to be learned.

After the Boston Marathon bombing, a journalist asked me, “Why is it always angry young men who do these terrible things?” She then sought to connect the behavior of the Tsarnaev brothers with that of Jared Loughner, James Holmes, and Adam Lanza. Like many people, she believed that similar actions must have similar causes.

But there are many sources of human evil. And if we want to protect ourselves and our societies, we must understand this. To that end we should differentiate at least four types of violent actor.

1. Those who are suffering from some form of mental illness that causes them to think and act irrationally. Given access to guns or explosives, these people may harm others for reasons that wouldn’t make a bit of sense even if they could be articulated. We may never hear Jared Loughner and James Holmes give accounts of their crimes, and we do not know what drove Adam Lanza to shoot his mother in the face and then slaughter dozens of children. But these mass murderers appear to be perfect examples of this first type. Aaron Alexis, the Navy Yard shooter, is yet another. What provoked him? He repeatedly complained that he was being bombarded with “ultra low frequency” electromagnetic waves. Apparently, he thought that killing people at random would offer some relief. It seems there is little to understand about the experiences of these men or about their beliefs, except as symptoms of underlying mental illness.

2. Prototypically evil psychopaths. These people are not delusional. They are malignantly selfish, ruthless, and prone to violence. Our maximum-security prisons are full of such men. Given half a chance and half a reason, psychopaths will harm others—because that is what psychopaths do.

It is worth observing that these first two types trouble us for reasons that have nothing to do with culture, ideology, or any other social variable. Of course, it matters if a psychotic or a psychopath happens to be the head of a nation, or otherwise has power and influence. That is what is so abhorrent about North Korea: The child king is mad, or simply evil, and he’s building a nuclear arsenal while millions starve. But even here, very little is to be learned about what we—the billions of relatively normal human beings struggling to maintain open societies—are doing wrong. We didn’t create Jared Loughner (apart from making it too easy for him to get a gun), and we didn’t create Kim Jong-il (apart from making it too easy for him to get nuclear bombs). Given access to powerful weapons, such people will pose a threat no matter how rational, tolerant, or circumspect we become.

3. Normal men and women who harm others while believing that they are doing the right thing—or while neglecting to notice the consequences of their actions. These people are not insane, and they’re not necessarily bad; they are just part of a system in which the negative consequences of ordinary selfishness and fear can become horribly magnified. Think of a soldier fighting in a war that may be ill conceived, or even unjust, but who has no rational alternative but to defend himself and his friends. Think of a boy growing up in the inner city who joins a gang for protection, only to perpetuate the very cycle of violence that makes gang membership a necessity. Or think of a CEO whose short-term interests motivate him to put innocent lives, the environment, or the economy itself in peril. Most of these people aren’t monsters. However, they can easily create suffering for others that only a monster would bring about by design. This is the true “banality of evil”—whatever Hannah Arendt actually meant by that phrase—but it is worth remembering that not all evil is banal.

4. Normal men and women who are moved by ideology to waste their lives, and the lives of others, in extraordinary ways. Some of these belief systems are merely political, or otherwise secular, in that their aim is to bring about specific changes in this world. But the worst of these doctrines are religious—whether or not they are attached to a mainstream religion—in that they are informed by ideas about otherworldly rewards and punishments, prophecies, magic, and so forth, which are especially conducive to fanaticism and self-sacrifice.

Of course, a person can inhabit more than one of the above categories at once—and thus have his antisocial behavior overdetermined. There must be someone somewhere who is simultaneously psychotic and psychopathic, part of a corrupt system, and devoted to a dangerous, transcendent cause. But many examples of each of these types exist in their pure forms.

For instance, in recent weeks, a spate of especially appalling jihadist attacks occurred—one on a shopping mall in Nairobi, where non-Muslims appear to have been systematically tortured before being murdered; one on a church in Peshawar; and one on a school playground in Baghdad, targeting children. Whenever I point out the role that religious ideology plays in atrocities of this kind—specifically the Islamic doctrines related to jihad, martyrdom, apostasy, and so forth—I am met with some version of the following: “Bad people will always do these things. Religion is nothing more than a pretext.” This is an increasingly dangerous misconception to have about human violence.

Here is my pick for the most terrifying and depressing phenomenon on earth: A smart, capable, compassionate, and honorable person grows infected with ludicrous ideas about a holy book and a waiting paradise, and then becomes capable of murdering innocent people—even children—while in a state of religious ecstasy. Needless to say, this problem is rendered all the more terrifying and depressing because so many of us deny that it even exists.

To imagine that one is a holy warrior bound for Paradise might seem delusional, but we live in a world where perfectly sane people are led to believe such floridly crazy things in the name of religion. This is primarily a social and cultural issue, not a psychological one. There is no clear line between what members of the Taliban, al Qaeda, and al Shabab believe about Islam and the “true” Islam. In fact, these groups have as good a claim as any to being impeccable Muslims. This presents an enormous threat to civil society, which apologists for Islam and secular liberals can now be counted upon to obfuscate. A tsunami of stupidity and violence is breaking simultaneously on a hundred shores, and people like Karen Armstrong, Reza Aslan, Juan Cole, John Esposito, and Glenn Greenwald insist that it’s a beautiful day at the beach. Their determination that “moderate” Islam not be blamed for the acts of “extremists” causes them to deny that genuine (and theologically justifiable) religious beliefs can inspire psychologically normal people to commit horrific acts of violence.

For weeks after the Boston Marathon bombing, we seemed determined to remain confused about the motives of the perpetrators. Had they been “radicalized” by some nefarious person, or did they manage it themselves? Did Tamerlan, the older brother, have brain damage from boxing? Were his dreams dashed by our immigration laws? Experts on terrorism took to the airwaves and gave their analysis: These young men behaved as they did, not on account of Islam, but because they were “jerks” and “losers.”

Or was it just politics, with religion as a pretext? The New York Times reported that the Tsarnaev brothers were “motivated to strike against the United States partly because of its military actions in Iraq and Afghanistan.” Many people seized on this as proof that U.S. foreign policy was to blame. And yet the only plausible way that Chechens coming of age in America could want to murder innocent people in protest over the wars in Iraq and Afghanistan would be for them to accept the Islamic doctrine of jihad. Islam is under attack and it must be defended; infidels have invaded Muslim lands—these grievances are not political. They are religious.

The same obscurantism arose in response to the Woolwich murder—when two jihadists butchered a man on a London sidewalk while shouting “Allahu akbar!” Their actions were repeatedly described as “political”—and the role of Islam in their thinking was reflexively discounted. Why political? Because one of the murderers spoke of British troops in Afghanistan and Iraq invading “our lands” and abusing “our women.” Few seemed to wonder how a Londoner of Nigerian descent could feel possessive about Afghan and Iraqi lands and women. There is only one path through the wilderness of bad ideas that reaches such “political” concerns: Islam.

Take a moment to consider the actions of the Taliban gunman who shot Malala Yousafzai in the head. How is it that this man came to board a school bus with the intention of murdering a 15-year-old girl? Absent ideology, this could have only been the work of a psychotic or a psychopath. Given the requisite beliefs, however, an entire culture will support such evil. Malala is the best thing to come out of the Muslim world in a thousand years. She is an extraordinarily brave and eloquent girl who is doing what millions of Muslim men and women are too terrified to do—stand up to the misogyny of traditional Islam. No doubt the assassin who tried to kill her believed that he was doing God’s work. He was probably a perfectly normal man—perhaps even a father himself—and that is what is so disturbing. In response to Malala’s nomination for the Nobel Peace Prize, a Taliban spokesman had this to say:

Malala Yousafzai targeted and criticized Islam. She was against Islam and we tried to kill her, and if we get a chance again we will definitely try to kill her, and we will feel proud killing her.

The fact that otherwise normal people can be infected by destructive religious beliefs is crucial to understand—because beliefs spread. Until moderate Muslims and secular liberals stop misplacing the blame for this evil, they will remain part of the problem. Yes, our drone strikes in Pakistan kill innocent people—and this undoubtedly creates new enemies for the West. But we wouldn’t need to drop a single bomb on Pakistan, or anywhere else, if a death cult of devout Muslims weren’t making life miserable for millions of innocent people and posing an unacceptable threat of violence to open societies.

Malala did not win a Nobel prize this week, and it is probably good for her that she didn’t. She absolutely deserved it—far more than several recent recipients have—but this recognition would have made her security concerns even more excruciating than they probably are already. Her nomination is said to have noticeably increased anti-Western sentiment in Pakistan—a fact that deserves some honest reflection on the part of Islam’s apologists. If for nothing else, we can be grateful to the Taliban for reminding us of what so many civilized people seem eager to forget: This is both a war of ideas and a very bloody war—and we must win it.