Over the last 20 years or so we have seen a blurring of the lines which differentiate between illegal aliens and legal immigrants or foreign residents. Politicians and the media have blurred the line, probably to confuse voters and have them support their objectives and policies.
Illegal immigrants entering the USA.
It's evident to me that illegal immigration harms the nation as a whole. If the country feels it requires immigration then it should be legal immigration, and those who do receive the resident visa should be screened for security, health, and utility reasons.
However, a simple model shows illegal immigration, or legal immigration which emphasizes low skill immigrants, tends to increase poverty and inequality. The illegal low skill immigrants compete for low skill jobs, they help employers keep the total low skill worker population pool as a low pay underclass. Thus immigration has to be calibrated to avoid the oversupply of workers at the bottom.
Republican elites will encourage illegal immigration because it does help their businesses and profits. They understand very well how this works, and they have absolutely no problem putting a Mexican illegal worker to work in the USA on a job competing with a Chinese counterpart working in China, a Chinese worker who is in turn exploited by a heartless "communist" dictatorship practicing their hybrid communist/neofascist heartless capitalism.
Democrats, on the other hand, like to emphasize massive illegal immigration (if they can they'll make it legal) because illegal immigration is mostly made up of low educational level, underfed, low IQ males originating in the poorest sectors in Mexico and Central America. What the USA gets isn't even representative of the average person in those countries, they are getting a skewed sample: the more adventuresome, and desperate, coming out of very violent and extremely poor regions.
The answer as I see it is to have legal immigration, and design the entry process to allow people who help long term. This means immigration should involve a crime free, healthy, relatively young, smart, hard working, and compatible people. I couldn't care less about their color or religion, but they do need to bring value.