This will not be a full treatment on all of the economics of immigration, but rather I will be looking at a certain aspect of the current immigration debate, namely the supply and demand of access to the United States. Or you could probably say that it is the the supply and access to perceived opportunity.
Supply and Demand
One important thing to understand is that supply and demand tend to meet. Usually it is cost that pushes supply and/or demand up and down until they find the place that they meet. When some force prevents supply and demand meeting demand the difference is usually made up for in some sort of back market. For instance banning drugs does not eliminate demand for drugs, but the legal markets are unable to meet supply due to the law, so illegal black markets pick up the slack.
Immigration Parallels
It stands to reason that immigration would follow a similar trend. There is going to be demand for immigrating into the United State (or any country, but for now I'm focusing on the US), no matter what happens. Legal immigration is the supply side of that equation.
Open Borders?
One solution would be to just have open or nearly open borders. If all of the demand for immigration was met in the legal immigration market, then there would be minimal illegal immigration. While it would be nice to get rid of illegal immigration, the open borders proposition is not satisfying to most, because the country loses the ability to be as selective as many would like.
Closed Borders?
Completely closed borders would reduce the total number of people coming into the country, but it would mean that all of the immigration is illegal immigration. It also has the undesirable effect that those who will be coming into the country are those that are most willing to break laws, as law abiding people are more likely to be dissuaded by the laws in place.
Relevance to Current Debate
If Trump and the Republicans that enable him were really concerned about reducing illegal immigration, and getting the best and brightest from the world rather than those that they see as undesirable then they would not be looking to reduce legal immigration. They could take a lesson from the arguments for legalizing drugs (legalize it so that you can collect taxes from it). The correlating argument here is that if you increase legal immigration with some additional checks and requirements*, then you could meet some of that demand, and get the type of people they claim to want. But their insistence on deportation, border security, and reducing legal immigration shows that their motivations are more racially motivated than they admit to.
*There already are a lot of background checks for all legal immigrants, which gives lie to many of Trumps arguments, but that is not my primary point in the article.