Leslie Berestein Rojas, KPCC immigration reporter, in a May 11, 2017 article, "Here's What Happens to Undocumented Immigrants When They're Detained," available at scpr.org, stated:

“It really depends on your case: where you’re from, what your background is, if you have a criminal record, etc. But I’ll give you some basics. Say you’re from Mexico, which shares a land border with the U.S., and you get picked up incidentally – at a worksite or wherever. You don’t have a deportation order, but you are living here illegally. If you don’t have a criminal record, chances are you’ll get sent out of the country pretty fast. You’ll be offered a ‘voluntary return,’ which means you don’t fight it. In that case, you could be transported to the border the same day…

Anyone can ask to see a judge, and anyone can say they have a credible fear of going back. In that case, officials will determine if you’re a flight risk or if you’re a security threat. At that point, they’ll decide whether to put you in detention. If you have a criminal record, chances are good that will happen. If you have a deportation order already, it could go a couple of ways. They could simply reinstate the deportation order and get you out of the country ASAP. Or, if you have been formally deported before and you’ve come back, they’ll mostly likely try to prosecute you. That means federal jail time…

[If you’re not from Mexico] there’s a good chance you’ll be detained. Pretty much the same rules apply, otherwise – you can appeal your deportation or not. If you appeal, you could be detained for some time as your case moves through immigration court. If not, they’ll send you back to your home country as soon as they can get travel documents for you, and get you on a flight…

[If you are returned to Mexico] Immigration officials will take you to the border and deliver you through a turnstile to Mexican immigration officials. Government workers there will process you and give you some information and pointers, depending on where you’re going. Then you’ll be referred to a few places where you can say, shelters like Casa Del Migrante, for example, which has received deportees for years. Then it’s up to you. Some people will try to come back, but that’s become a lot more difficult and expensive in recent years.”

May 11, 2017