Often, when an individual is arrested and charged with a crime, whether it is DUI or most any other criminal offense, the defendant is brought before a judge who will determine if and how much bail should be set for. Bail is not a punishment, rather it is an assurance on the part of the defendant that they will be responsible to appear for and answer the charges the State has brought against them. There are laws in most states stipulating that the amount of bail cannot be excessive.
It is also possible that, if a defendant has no previous criminal record and the charges are not especially violent or serious, that no cash bail may be set and the defendant may be released on their own recognizance. In the case of a DUI charge, there may be no cash bail but the judge may make certain conditions for bail, such as drug testing and/or counseling.
Also, if the charges are especially serious of if there was a fatality involved in the committing of a less serious crime, the judge may decide that the defendant will be held without bail. You need an experienced legal expert to guide you through your bail hearing and all aspects of a criminal case against you.