It depends on what type of attorney you have. If you have a court-appointed attorney or a public defender, it’s not likely a judge will let you switch attorneys. Typically there are disagreements between public defenders and clients over strategies and how best to handle the case, and those disagreements usually do not result in a change in attorney. In some situations, however, if the disagreement is very serious or if there are other extreme circumstances that would make it impossible for a public defender and a client to work together, the judge may allow the defendant to have a new attorney.
If a defendant has his or her own attorney, one that has not been appointed by the court, the defendant has the right to fire him or her at any time. The firing can be for any reason or no reason at all. The defendant can hire a new attorney, although this could be expensive, since the new attorney will be spending time familiarizing himself with the case, and because the original attorney will have to be paid.
One situation in which a defendant may not be able to fire his or her own attorney is if the attorney change will affect the date of trial. If you wait until the last minute before trial, your new attorney may not be able to effectively represent you unless the trial is postponed. Judges are often anxious to keep things moving along, especially if the prosecution objects to the delay.