The public defender is an attorney appointed to represent people who cannot afford to hire one. Many other countries provide people with public defenders. A public defender is a lawyer who works for a public defender's office, a government-funded agency that provides legal representation to indigent defendants. The court appoints the public defender's office to represent the defendant, and the office assigns a lawyer to the defendant's case. In the federal criminal court system and some states and counties, representation is through a publicly-funded public defender office.
Other courts may appoint private lawyers who have agreed to represent indigent defendants, with appointment being either on a contractual basis, through which the lawyer accepts an agreed number of cases from the court for the term of the contract, or a case-by-case basis.