This is what we call a "red scare." The first Red Scare happened after World War I -- which also was the time when communists came to power in Russia. (The Bolshevik Revolution began in Russia in 1917, during the time of the war.)
The second Red Scare came after World War II. During the war, the USA and the USSR had been allies -- although always somewhat uncomfortable allies. Together they fought to defeat German and Japanese aggression. But the USA and the USSR had very opposite views to one another. So after World War II ended, there was great fear in America again about the infiltration of communist ideas around the world.