Okay, get comfortable, because this is a long story. Totally worth it, though.
At the end of World War II in 1945, half the world was reduced to rubble. The only two powers still on their feet were the USA and the USSR, who'd been BFFs against Germany in the war but who soon broke up over their serious political and economic differences.
After the war, the countries found new countries to hang with, and Europe was pretty much carved up into American (France, West Germany, Italy) and Soviet (Poland, East Germany, the Balkans) spheres of influence. They still spent a lot of time thinking about each other, though. And spying on each other to see who had the best weapons and the most friends.
The U.S. had used nuclear weapons against Japan in 1945, and the USSR wasn't far behind, testing their first bomb in 1949. Humans now had the power to literally end the world, and the keys to the apocalypse were in the hands of two countries who hated each other.
The escalating arms race threated to wipe humanity off the map, which served as a deterrent to actually using the increasingly huge piles of nukes.
Instead, the U.S. and the USSR settled in to a decades-long standoff called the Cold War Era. "Cold" because no nukes. "War" because they found plenty of other ways to antagonize each other, from espionage to Olympic Games competitions to technology and science one-upmanship. Both nations had missile and submarine drive-bys in neighboring countries just so nobody would get too comfortable.
The rivalry stoked worries that there were Communist sympathizers inside the U.S. that would become spies and undermine the security of the nation. Because the USSR was known to want to bring other nations into their orbit, there were legitimate concerns about Communist infiltration. And, witch-hunting aside, there were in fact Soviet spies operating within the U.S., some of them even in the government. But from all reports, the espionage was way less exciting and dangerous than The Americans would have you believe. It was mostly about acquiring weapons technology secrets from the other side.
The U.S. did it, too.
In addition to wanting to keep as many countries as possible in their orbit, a central conflict between America and the USSR during the Cold War was the opposing ideas of capitalism and democracy, as practiced by Western countries, and communist totalitarianism, as espoused by Russia and its satellite nations (the "S.S.R.s" in "USSR"). We'll give you a quick "Political Economy for Dummies" version of the two systems.
Communists generally argue that capitalism disproportionately rewards the wealthy and powerful and exploits the working class. (See: income inequality.) In fact, Communism arose in Russia in response to the terrible exploitation of the working class during the Czarist era.
Capitalists believe that Communism destroys personal initiative and innovation and curtails freedoms because of state control of…everything. (See: Russian cars and other consumer goods have a rep for being shoddy and unreliable. Plus, why would anyone want to work hard if they couldn't get any more than the next guy? And who wants to only watch one TV station or buy one kind of phone?)
(We now pause to answer the question we know you're asking: What about China? It's a Communist country, but they make awesome stuff. True, but China's made moves towards a market economy that the Soviets weren't willing to try.
During the Great Depression, there had been some flirtation with Communism in the United States. Basically, a bunch of people lost all their money in the crash of 1929 and started thinking that the whole "everyone shares" thing wasn't such a bad idea. For most people, this was a pretty minor flirtation. And hey, even for those that really liked the idea, embracing Communism was a First Amendment Right.
Or so they thought.
After the 1949 Communist Revolution in China and the Korean War, America saw Communist influence expanding even more around the globe, and fears of infiltrators grew. Plenty of people were willing to stoke those fears. FBI Director J. Edgar Hoover was a notorious Red-hunter. Anyone who protested any policies of the United States could be labeled a Communist sympathizer and harassed and discredited. Even Dr. Martin Luther King, Jr. was the subject of an intensive ongoing FBI investigation because he dared demand civil rights for all Americans. The nerve.
American citizens fell victim to this "Red Scare." Lots of books and magazines were considered off-limits because of "Communist" content. Even Robin Hood was pulled off library shelves because his "take from the rich and give to the poor" philosophy was seen as suspicious. Seriously. (Source)
Government employees were asked to take loyalty oaths, and if they refused, look out. Citizens were warned to be on the lookout for closet Communists. There were, in fact, Soviet agents discovered and prosecuted during this time, but clearly things were going a bit bonkers.
The House Un-American Activities Committee (HUAC) had been formed in 1938 to investigate threats to national security, and it became the vehicle for prosecuting real and imagined communist sympathizers. When the "Hollywood Ten," a group of screenwriters and movie directors, tried to defend themselves from HUAC by invoking the First Amendment, they promptly found their professional and personal lives destroyed. (Source)
Countless patriotic Americans were dragged before HUAC and asked the dreaded question, "Are you now, or have you ever been, a member of the Communist Party?" After that, anyone confronted with allegations either "named names," giving over a list of other people to persecute in an effort to save themselves, or they invoked their Fifth Amendment privileges. The ones who did the latter got slapped with contempt of Congress charges, which is totally not what's supposed to happen.
It was not a fun time in America.
Enter Joe McCarthy.
McCarthy had been a relatively undistinguished member of the U.S. Senate since 1947. Three years later, with an otherwise unremarkable speech, he latched onto the anti-communist hysteria already brewing, claiming that he personally knew of 205 "card-carrying members" of the Communist Party in the State Department. In every speech, the number of Communists went up and down like a prairie dog on a pogo stick. Just sayin'.
It wasn't only Reds he was after. He viciously went after people suspected of being gay, on the theory that their homosexuality made them targets for blackmail unless they went to work for them.
His attacks knew no bounds. He called Truman's Secretary of Defense and later Secretary of State George Marshall a traitor of the worst kind. Remember Marshall? You know—the Marshall Plan, the Nobel Peace Prize?
Anyway, McCarthy used his position as chairman of the Senate Permanent Subcommittee on Investigations to investigate alleged Communist infiltration among government employees. (Investigation of private citizens was done by HUAC.) He also used the hearings as a way to destroy his political enemies and to build his own power by crushing people with accusations. Anyone who dared question him was—you guessed it—a communist sympathizer.
Eventually, he took it too far. He was convinced that there was a Communist spy ring operating within the Army Signal Corps in New Jersey, started by the recently executed spy Julius Rosenberg. McCarthy declared that the Army was "soft on Communism" and even accused one war hero General of being a "disgrace to his uniform." (Source)
McCarthy opened up hearings against the Army, but they went nowhere. So he decided to go after an Army dentist with leftist inclinations, Irving Peress, who'd refused to answer some questions on his loyalty questionnaire and took the Fifth when questioned by McCarthy. By this time, the Army had had it with McCarthy, and decided to retaliate by investigating Roy Cohn's attempt to get special Army treatment for his buddy and crush, David Schine.
Two networks decided to broadcast live from the hearings. From April 22 to June 17, they aired about 185 hours of coverage almost exactly 3 times the number of Breaking Bad episodes.
About 20 million people were estimated to have binge-watched the drama unfold (source). How much the witnesses and lawyers played to the cameras was anybody's guess. Regardless, the viewers saw McCarthy's tactics for themselves and were treated to Welch's playful performance. Among other things, the hearings demonstrated for the first time the power of TV to shape the opinions of the American public, something that American Idol would raise to an art form fifty years later.
Efforts to root out Communist sympathizers and agents didn't stop after McCarthy was discredited. While there were periods of détente with the Soviets, serious conflict between the superpowers continued until the fall of the Soviet Union in 1991. Americans continued to worry about being seen as unpatriotic or disloyal, but the hysteria and fear faded over time. Still, Americans breathed a collective sigh of relief when the McCarthy nightmare ended.
Americans who lived through the McCarthy era look back on it like they look back on the times they were total jerks to that kid in school who was perfectly nice but dressed weird. Now that we're all grown up, we'd never fall for that stuff. We wouldn't even think of allowing politicians to demonize one group of Americans or encourage us to spy on each other or smear people just because they have different beliefs or religious backgrounds.