I've seen layoffs in two companies. At one, no one had a clue that there were going to be layoffs at all. People showed up for work as usual in the morning, and then pretty much just disappeared during the day. The rest of us found out about the layoffs as we asked where someone was, or got a text or email from someone who had been let go.
At the second place, they did the same thing, but there was a huge backlash from the rest of the employees, so the following year, when they had to do more layoffs, they announced the day before that there would be layoffs the next day. Which meant everyone went home not knowing if they had a job or not.
There is pretty much no recourse for the laid-off employee. They will probably get some sort of severance pay, and can file for unemployment, but the chances of getting their old job back depend on their company getting more work.
The only employees who might have some sort of safety net are union employees. Unions usually have some sort of protection for their employees. But that doesn't mean that layoffs won't happen, just that people with seniority or certain skills will keep their jobs or be moved to other jobs--bumping an employee with less seniority, while others will still be laid off. Or the union contract may give employees the option of reducing their hours, going part-time or retraining instead of being laid off. But only about 12% of US employees are in union jobs.