What will happen in your friend's case depends on the circumstances. You indicate that he had "traffic ticket" warrants and that he owes "over $4000". Sounds more like criminal matters than civil traffic tickets. Typically if someone fails to pay a civil traffic fine, their license is suspended but no arrest warrant is issued. Will you provide more information, if you have it? Or you can contact me directly. Good luck.
If there was a warrant out, then the tickets were likely criminal in nature. He probably will need to post a bond in order to get out of jail right now. If he doen't post a bond, he will be taken to court. Sometimes a court is willing to give credit against fines for time spent in jail but your friend needs to ask the court or his attorney whether that is possible. The court will want to know why he failed to pay his fines and he better have a good answer.