McCarthyism is an ideology, method or practice that takes its name from Senator Joseph McCarthy, who became synonymous with the "Red Scare" of the 1950s.
After World War 2, there were essentially two major powers in the world; the United States and the Soviet Union. The power vacuum left by the collapse of the major European empires, the near-equal military and economic power of the US and USSR, and their antagonistic political systems, cast the postwar world as a political playground for these countries to compete upon. The threat of nuclear war made direct confrontation untenable, and so both sides came to use, and to fear, espionage, subterfuge and all other forms of indirect warfare. This was the climate in which the original form of McCarthyism flourished.
In the minds of some 1950s Americans, Communism and the Soviet Union were one and the same, and even the slightest hint of sympathy toward either was instantaneously grounds for accusations of treachery. This stemmed from the enormous stakes at hand; a spy, in the right place at the right time, could make America vulnerable to a nuclear attack, or transform it from the inside out to become more communist itself. One significant, and in some ways substantiated charge, was that communists and communist sympathizers were deeply embedded in the media, and therefore controlled public information and entertainment.
What remains in the public consciousness, and lends itself to the non-historical interpretation of the term "McCarthyism" is the hearings and blacklists which essentially allowed suspicion of communist sympathies to subvert or destroy someone's career. This was possible through legal loopholes and gaps, and the broad (at the time) public support for the idea of McCarthyism, if not its exact results.
In modern terms, McCarthyism refers to things which reenact this climate; a dichotomous, us-versus-them worldview, suspicion, uneducated hatred, and illogical arguments which transform innocuous transgressions into treachery and subversion. Famous examples include The Crucible and Fahrenheit 451, both of which involve societies that are intensely suspicious, focus their power on their own citizens, and are undemocratic.