A public defender is a lawyer who is appointed by the court to represent individuals who cannot afford to hire their own attorney in criminal cases. They are responsible for ensuring the accused receive a fair trial and that their constitutional rights are protected.