Admitting undocumented status to law enforcement starts a process, but the full outcome depends on what the original reason for the contact with police was. If he was picked up specifically because of immigration status, that is handled through the civil immigration system rather than the criminal courts. In that case, he would be held in immigration detention while his case is reviewed by an immigration judge, and that detention can go on indefinitely while proceedings work through the system. There is no fixed timeline.
If there was an underlying criminal charge that led to the contact with police, both matters run simultaneously. The criminal case gets handled first, and immigration enforcement typically takes custody when the criminal matter is resolved, whether through release, acquittal, or completion of a sentence.
For a first-time immigration matter with no criminal charges attached, there may be options available depending on his circumstances, including voluntary departure, which avoids a formal removal order, or other forms of relief depending on how long he has been in the country, whether he has family ties, and other factors. An immigration attorney needs to evaluate his specific situation to identify what, if anything, can be done.
The most urgent step right now is getting an immigration attorney involved. The decisions made early in this process have significant long-term consequences, and he should not be navigating it alone.