The US government took several actions to stop the spread of communism including:
A) Giving financial aid to countries in hopes that they would not be taken over by the Soviet Union. In the Truman Doctrine and Marshall Plan, the US gives aid to several different European countries after World War II. Between the two laws, the US gave over $13 billion to these countries to ensure their economic stability.
B) The US government was willing to get involved in several different wars- The US government supported South Korea and South Vietnam in the Korean and Vietnam Wars. The reasoning behind this was they wanted to stop South Korea and Vietnam from falling under the control of the communist governments of North Korean and Vietnam.
In practice, this led to the forced relocation and internment of more than 110,000 Japanese and Japanese Americans who were placed in internment camps for the duration of the war. Wartime hysteria and racial prejudice pushed the country's leadership to violate rights guaranteed under the U.S. Constitution.