The Cold War was the state of conflict, tension and competition that existed between the 2 super-powers -- US and the Soviet Union and their respective allies after WWII . The conflict was expressed through costly defense spending, a massive conventional and nuclear arms race, and numerous proxy wars such as Korea (1950-53) and Vietnam (1965-75). It is a cold war because there was no direct hot fire, especially nuclear, between the two major super powers.
The alliance between the US and Soviet Union during WWII was one of convenience and, more importantly, of necessity for the defeat of Nazi Germany with a two front war. There was great mistrust among Stalin, Roosevelt and Stalin as the long term goals of the parties could not have been more different.
Stalin held the western powers responsible for the estimated 20 million deaths inflected on the Soviet Union during the war and he wanted to expand communism throughout the world. He disregarded agreements made between the three leaders during and immediately after the war. He refused to withdraw Soviet forces in Eastern and Central Europe and set up puppet governments that used draconian measures to suppress the native populations and imposed communism throughout all lands he "liberated" from the Nazis.
His intentions were first most clearly demonstrated in Berlin in 1946 when he tried to remove the western powers from the city. Pursuant to the Potsdam Agreement, the city was divided into 4 parts as was the country with Soviet, British. US and French sectors. Berlin was located inside the eastern portion of the county under Soviet control. He shut down all roads, trains and canals that supplied the population of West Berlin. No shots were fired but the purpose was clear. The US and British responded by flying everything into the city and after a year the Soviets backed down.
This game of "chicken" continued around the world with the most provocative action in Cuba in 1962. The Soviets assisted Castro after the revolution there as part of their spread of communism and as a strategic "thorn in the side" of the US - a communist country 90 miles off the coast of Florida. The Soviets were installing ICBM (intercontinental ballistic missals) with nuclear potential in Cuba. Kennedy placed an embargo around the island and threatened force. Stalin was dead and his successor, Krushchev, backed down. The US would escalate tensions with troops in Vietnam to stop the growth of communism until detente took over in the 1970s with Nixon.
There were American members of the communist party starting in the 1930s. It was legal. They joined for ideological and economic reasons. Communists were involved in labor union actions. Many saw a great disparity between the haves and havenots during the depression.
When Stalin signed a non agressio pact with Germany before WWII began, many left the party. More had just associations with communists but that history came back to haunt them in the late 1940s and 1950s when tensions arose over the Soviet Union. There were Soviet spies who gave nucdlear information to the communists. Senator Joe McCarthy took the red scare to its zenith with hearing to out communists in Hollywood, the Federal Government etc. Without evidence but mere accusations, he was finally brought down but the damage was done. Being pink became the death knell for a political career and being anti communist was essential. The current president has been accused by some of being a socialist.
The Cold War changed the economic picture of the US. The defense budget and budgets of CIA and other such agencies exploded. Communities around the country grew around defense jobs like Mobile, Alabama and Newport News/Norfolk, Virginia. The question can be asked how many nuclear weapons did we need and how much money could have been spent on other sectors.
The death of the Soviet Union removed that second great power but that vacuum is being filled economically by China who is also starting to exert its muscle in Asia. The nature of this struggle remains to be seen.