McCarthy's popularity was strongly linked to the Red Scare that followed World War II. McCarthy was very skilled at tapping into the worst and most paranoid instincts of Americans stressing that the nation was filled with Communist agents who were waiting for the perfect moment to take down the country. His House Unamerican Activities Committee (HUAC) trumped up charges against many people and sought to publicly embarrass those brought in front of it in order for them to identify people they thought to be Communists. The belief that institutions like HUAC were serving the public good by demanding individuals "name names." Television, the new medium of the time period, helped to make a name for HUAC and McCarthy. Yet, as the historian Clive James points out, if television had a role in bringing McCarthy up, it also had a role in bringing him down. Journalist Edward R. Murrow used his stature and his role to interview McCarthy and expose him for the blustery fraud he was, enabling all Americans to recognize a bully when they saw one. While McCarthy was brought down, he provided the basic template for many politicians who followed him in targeting and engaging in the politics of scapegoating in order to consolidate their own sense of power and control.
Joseph McCarthy became popular because many Americans (especially conservatives) were very suspicious of communists and thought that communists were likely to try to take over the US from within. Because McCarthy seemed to be a regular guy who was fighting elites who were probably communists, he was quite popular. This was especially true at first when the Korean War and the "fall" of China were still fresh in people's minds.
McCarthy fell largely because he overreached. He started to claim that people within the army were communists. When he did this, he ran up against a part of the government that most people respected. So now, instead of attacking egg headed elites, he was attacking respected military people.