The Sixth Amendment to the United States Constitution provides that “In all criminal prosecutions, the accused shall enjoy the right... to have the Assistance of Counsel for his defence.”
If you are charged with a crime resulting in a sentence of jail time and you cannot afford to hire a lawyer, you have the right to have the court appoint a lawyer to represent you free of charge.
As the Supreme Court recognized in Gideon v. Wainwright:
One way to think about the importance of the Sixth Amendment right to counsel is to compare it to competition in business. Our economy is based on the idea that when companies have to compete, consumers benefit. The situation in the courtroom is similar: When the state has to prove its case while facing a qualified defense lawyer, it is much more likely that only the guilty will be punished. By ensuring that the state must prove its case each and every time it seeks to remove individuals from the community and send them to trial, the right to counsel gives the community greater faith in the fairness and accuracy of the criminal justice system.
The National Legal Aid and Defender Association has answers to frequently asked questions about the constitutional right to counsel on its website.