Obviously people during the Cold War did not just all of a sudden stop worrying about communism but McCarthyism did not last throughout the entire time period. Why is that?
And as a followup question, how were outspoken opponents of McCarthyism seen/treated by other members of society?
McCarthyism should be seen as distinct from, albeit related to, anti-communist sentiments. McCarthyism is essentially accusing people of subversion or disloyalty without regard to an actual body of evidence.
This is so antithetical to the basic American understanding of liberty and freedom that it would take an extreme confluence of events to sustain such a practice on a large scale, especially in light of the recent obvious use of such tactics by authoritarian regimes on all parts of the political spectrum.
A number of important court cases ensured the swift decline of McCarthyism, especially in the Supreme Court. In 1956, the Supreme Court heard Slochower v. Board of Education, in which a teacher who had been fired for invoking the 5th amendment during McCarthy's hearings was reinstated. This was important (especially the strong wording used in the decision) in enshrining Fifth Amendment protection as a bedrock of liberty. No longer could invoking this constitutional protection be interpreted as a tacit admission of guilt or evidence of perjury.
Two cases in 1957 more directly attacked the tactics used by McCarthy's hearings and the HUAC. In Yates v. United_States, the convictions of 14 people were reversed, with the decision stating that the rationale used for making controversial beliefs the centerpiece of a trial, combined with an overestimation of the importance of certain types of circumstantial evidence, makes it almost impossible for someone to prove their innocence.
In Watkins v. United States, the justices found that simply summoning someone to Congress and then punishing them for contempt of Congress when they didn't answer your questions was an unforgivable act of government interference in private life.
In the 1958 Kent v. Dulles case, it was rules unconstitutional for the State Department to utilize their own regulations to deny passports to people simply for their political leanings.
The most important non-Supreme Court case, in my opinion, was initiated by John Faulk. He was blacklisted and fired from a comedy radio show after an investigation by a private firm that investigated "disloyalty." He sued the firm in 1957, and won the case in 1962, which put all other such firms on notice that they would be held legally and financially responsible for their actions, effectively ending the existence of these private agencies while simultaneously emboldening others in the entertainment industry to break the blacklist.
Thank God for Earl Warren, an Eisenhower appointment to the Supreme Court who was Chief Justice during this time. He ended up being much more liberal than Eisenhower intended, and may have been a driving force in saving an American liberty that otherwise could have seen serious long-term setbacks.