For rich and connected people convicted of white collar crimes it's very common. It's also common for upper class criminals to arrange the terms of their own work release-- where they are employed by a company they own and are free 12+ hours a day, only returning to custody to sleep. (Epstein did this with his first conviction)
For the rest of the population without money, power or connections accused of drug crimes or petty theft it's typical that you will be arrested and placed in jail immediately and will be in custody until you are convicted / sentenced at which point you will go directly to prison.