What was the U.S. policy towards communism in the 1950s and 1960s?
It did not have one in general but did towards the Soviet version and another towards the Chinese version.
Even though communism had existed from the beginning of the 20th Century, America had never been forced to deal with it head on. World War 2 changed all that.
The British and French, our long time and natural allies, had significant investments in China and Asia in general. When Mao Tse Dung took control of China in 1949 there was a general destabilization in the Far East. That continued in 1950 when North Korea attacked the south. In response to it America built up its military presence in Taiwan, Okinawa, Japan, Korea, and the Philippines. America considered it a British/French problem and that we should stand back unless called upon by our allies.
But Europe was entirely different. The Soviet Union never pulled its troops out of the countries where it defeated the German army. In fact, they increased their presence and pressed their will upon those countries.
In 1948 the Russians closed the road which connected West Germany with Berlin. Berlin sat in the middle of the Soviet controlled East Germany and the Soviets wanted us out. To counter this President Truman generated the Berlin Air Lift which brought all sorts of supplies to West Berlin. It was a stare down the U.S. won. The U.S. still felt it held the upper hand in world politics.
But the on August 29, 1949 the Soviet Union set off its first atomic bomb. The Soviet Union was inserting itself as a Communist world power. This scared the hell out of many Americans. It started the "Cold War" where the U.S. and the Soviet Union vied for the position of top dog.
The "Red Scare" in America was palpable by 1954 when Sen. McCarthy started his committee on un-American Activities in which he black listed, deposed and ruined the live of many Americans out of his own hysteria that communist Russia was infiltrating us with the idea of taking us over from the inside out.
Each country built up its nuclear arms to a degree that became referred to as "mutually assured destruction." That meant that if either side attacked the other, both would ultimately be destroyed.