What is the process if someone remains in custody?

If a defendant is not bailed out of custody whether because they have been denied bail or because someone has not posted bail on their behalf they would remain in jail until the court authorized their release. Depending on the charges this may vary from a few days to several months.