Many factors go into how quickly or slowly a criminal case can take, such as the severity of the charges, the complexity of the case, and laws and court rules setting speedy trial rights.
The type of criminal case and the charges involved can greatly impact how long the case will take. A misdemeanor drunk driving case, for example, might resolve within a month of the date of arrest under a standard plea offer. (Prosecutors often have a policy of offering a routine deal to certain kinds of offenders, like DUI arrestees without any prior convictions.) Felony trials can linger without resolution for over a year—and that's without accounting for any delay between arrest and the filing of charges. A complex criminal tax fraud case might involve extensive discovery of tax documents and filings, whereas a shoplifting case caught on camera could resolve rather quickly.
There can also be a delay between an arrest and the filing of criminal charges. However, once criminal proceedings have begun (with the filing of charges), defendants can generally force them to move relatively quickly. For example, in California, a defendant charged with a felony must be brought to trial within 60 days of being arraigned on an information or indictment unless there is "good cause" for delay—otherwise, the judge must dismiss the charges. (Cal. Penal Code § 1382.)
The time within which a defendant must be brought to trial can vary from state to state, and also depending on whether the accused is in jail. In California, in-custody defendants (those sitting in jail) charged with either a misdemeanor or an infraction have the right to go to trial within 30 days of arraignment or entry of a not-guilty plea; 45 days is the time limit for those who are out on bail or their own recognizance. (Cal. Penal Code § 1382.)
In-custody defendants often don't want to "waive" time, while out-of-custody defendants often do. Waiving time means the defendant agrees not to enforce the speedy-trial rules on timing, giving the prosecutor and defense more time to work on their case. There is no hard-and-fast practice, however, and defense attorneys usually have a strategy for recommending that the client either waive time or not.
When facing any criminal charges, talk to your criminal defense lawyer or public defender about the pros and cons of requesting a speedy trial versus waiving time. Your lawyer can explain how the criminal system works and what to expect in cases like yours.