The McCarthy era (and the post–World War II anticommunist hysteria more broadly) is often compared to the Salem Witch Trials for two main reasons.
First, both the trials, which took place in late seventeenth-century Massachusetts, and the exploits of Joseph McCarthy in the early 1950s revolved around popular fears. Historians differ about the root causes of the Salem Trials, but certainly fear of the supernatural and the prospect that Salem and its surroundings were under attack by Satan was a driving force. Likewise, the fear of communism, especially that communists had infiltrated the United States government, made Joseph McCarthy's cynical claims more plausible with the American people.
Second, the Salem trials featured denunciations of alleged witches by their fellow villagers. This added to the atmosphere of fear and suspicion and strained the bonds of Salem society. People accused of being witches were encouraged to name others who were also witches, and so the craze swept up dozens of villagers. "Spectral" evidence, based on descriptions of ghostly figures by witnesses, was admitted in court, which was highly unusual even in the seventeenth century.
Likewise, the anticommunist scare witnessed many people—government employees, Hollywood writers, and others—being accused of communist sympathies, often on the testimony of their peers. Senator Joseph McCarthy's hearings, conducted on national television, demonstrated the power of these accusations, often made on spurious or nonexistent evidence, to ruin the lives of the accused.
The parallels between the anticommunist scare of the twentieth century and the witch hysteria of the seventeenth were most memorably drawn in The Crucible, a twentieth-century play by Arthur Miller about the witch trials. Miller, himself accused of communism, meant the play to be a powerful allegory that illustrated the absurdity of the "witch hunts" of his own times.