Your first opportunity to ask the court to appoint a lawyer will be at your first court appearance, normally called an arraignment. At that time, a judge will ask you whether you are represented by an attorney or need a public attorney appointed to your case. Unfortunately, a public defender only starts working for you after the arraignment. A private attorney begins working on your case and legal strategy as soon as you retain them.
Each county is also different in regard to getting a public defender. If you are judged to be indigent facing serious charges with potential jail time, then you are likely eligible to receive a public defender. If you don’t qualify as an indigent, you may obtain the services of a court-appointed attorney. Most counties provide for “partial indigency,” meaning at the conclusion of your case you will be liable for reimbursing the state or county for a portion of the costs associated with your representation.