Why did communism cause such fear in the United States in the postwar period?
Communism became a threat to the United States during the postwar period because of the ideologies it was spreading. The United States together with its allies had won the Second World War but they were not completely out of danger. This is because the ideology being propagated by communist leaders in their countries was aimed to infiltrate the U.S. and undermine its government. The communist countries recognized it would be difficult to launch a military attack against the U.S. so they chose to attempt to inspire rebellion among the U.S. citizens against their government. This would have helped them win the war by weakening the United States internally.
The communist countries decided to spread their ideology by expanding their territories. This was with the aim of increasing their power and establishing their superiority and economic ties to counter those of the United States. This eventually led to indirect armed conflict by the two groups in areas such as the Middle East and Africa with both communists (Russia and China among others) and capitalist (the U.S. and Britain among others) fighting for allies in those countries.
Communism caused fear in the US for two main reasons.
First, it was spreading across the world and gaining in power. China became communist in 1949. The Soviet Union got the atomic bomb in that year as well. These sorts of things made it seem as if communism was a real threat.
Second, it was an ideology that could conceivably conquer the US without invading. If stopping communism had only been about military power, it would have been less frightening because the US could win military battles. Instead, communism could enter the country in less obvious ways, by "converting" people to believe in its message.
Communism, then, was spreading across the world and could conceivably take over the hearts and minds of Americans if they were not vigilant.
The emergence of Soviet Union as a superpower in the World War 2 caused doubts and apprehensions in US. First, the Soviet Union represented a different way of life and governance, a manner that echoes with the poor people and hence is more likable to the capitalistic nature of American politics. Communism was spreading everywhere since the weakened European powers were forced to liberate their colonies and poverty ridden states were accepting communism as happened in the case of China. So Communism offered a great alternative to capitalism.
Soviet Union also emerged as an option to US, both militarily and production-wise. US was dependent on foreign trade and arm-flexing was also practiced as needed. However, an alternative in the form of Soviet Union, provided more options to the buyers.
Also, the communist philosophy did not need conquering countries, it simply infiltrated the daily lives and hence a combination of all these factors led to the widely perceived communist threat to the US and culminated in Cold War.