Criminal Law Questions? Ask a Criminal Lawyer.
It depends. If the jail discovers the fact that he's illegal, they could call ICE who could come pick him up. However, many jails don't call ICE.
My recommendation would be to post his bail as soon as possible. ICE will only put a "hold" on him while in jail. If they do that you won't be able to bail him out.
If, however, you bail him out before they get an ICE hold, they'll let him go and it is very unlikely that ICE will come get him.
The reality is that most courts deal with illegal immigrants on a frequent basis and if the person only committed a misdemeanor, they typically don't get deported.
I hope that answers your question. If you have any questions in the future, you can request me specifically. Good luck to you and your friend.