The Red Scare commonly refers to a time immediately following World War I.
During that war, the US government had created the Creel Committee to drum up patriotic support for the war effort. When it ended, that foreign threat had gone - but the patriotic fervour and nativist attitudes remained.
Furthermore, Russia had undergone a communist revolution, which they intended to spread not just within their own country, but to the entire world, the United States included. Although there had been socialists and communists in America previously, now the Soviet Union appeared to be actively sponsoring it.
When the war ended, immigration was restarted and many people flooded into America, filled with ideas about a better life. Often they were skilled workers, or had a different work ethic to the existing American workers, causing them sometimes to find employment in American companies in preference to American workers.
The vast military force America had used to fight Germany was demobilised in a very short space of time, and the contracts and investments the government had created for the duration of the war were gone - reducing the number of jobs available. It wasn't uncommon to see crowds of unemployed people outside the factories, hoping for a vacancy - and when they saw that foreign workers had jobs and often they did not, they were enraged.
Because of the lack of demand for products (in turn because so many people were unemployed and didn't have the money to buy as much), wages and working conditions weren't optimal either. Many people went on strike and formed unions in an effort to win higher wages.
One such strike involved the entire Boston Police Department; the city's response was to fire every officer. The inhabitants were clearly unhappy about the lack of a police force to protect them, and the public's sympathy turned elsewhere. All over the country things were coming to a standstill because of strikes - and, in general, the public weren't amused.
As if that weren't enough to inspire fear of perceived "radical" elements in society, several sets of bombings were conducted through 1919 and 1920. At one point, over thirty mail bombs were sent out; crime was high due to desperation and unemployment.
The blame, in the public's eyes, sat squarely with the immigrants, who they felt were bringing in dangerous ideas, and who often came from parts of the world that had never previously immigrated into the US. (The Creel Committee had conditioned the public to believe that foreigners were fine - as long as they didn't look or act differently.)
The first course of action was the Emergency Quotas Act, which counted the number and proportion by country of immigrants in the country in 1910, took 3% of that figure and allowed only that number and proportion of immigrants into the country each year.
Attorney General Palmer created the General Intelligence Department with J Edgar Hoover to investigate and root out the dangerous radicals, and deport them. The Palmer Raids, as they are known, were conducted in 25 cities in 1919, and in 33 cities in 1920.
The National Origins Act was also introduced, which recalculated the figure in the Emergency Quotas Act using immigration levels and proportions in 1890. This is particularly important because during that year there were almost no immigrants from eastern Europe - which was the perceived source of most of the radical elements.
Reference: American History: A Survey, 11th Edition, by Alan Brinkley