What happens when a country stops accepting immigrants?

One of the priorities of the Trump administration is to restrict immigration, both legal and illegal, under the premise of protecting the jobs and increasing the salaries of natives.
Even if those policies have their intended effect (which is still a matter of debate,) the long-term consequences of reducing the flow of migrants could be more destructive and widespread than its short-term benefits.