Answer:
When charged with a crime in the United States, the defendant in the case has certain rights (see Miranda v. Arizona). These rights are:
-the right to remain silent (anything the defendant says can be used against them in court)
-the right to legal representation; even if it can't be financially afforded by the defendant
The attorney that will be appointed to or hired for the defendant is called a criminal defense attorney. Some criminal defense attorneys work for the government and are referred to as a public defenders (PD).
After being arrested and jailed or, in some cases, being summonsed to court without being jailed, the arresting officer(s) compose reports on the crime. These reports are forwarded to an attorney that works for the government. This would be the criminal prosecutor or deputy prosecutor, also known as the state. These people are responsible for obtaining and organizing further information and evidence in order to present it to the court, judge, and/or jury on behalf of the government or state. The prosecutor him/herself is usually an elected official with one to several attorneys working under his/her supervision (deputy prosecutors).
answer 2
The question was simple and the original answer, which was removed, still stands [The defence attorney try's best to stop a guilty verdict being reached, the persecutor try's best to get a guilty verdict]
And while the replacement answer contains much more information of matters regarding 'miranda' etc they are not relevant. Secondly, while a Public Defender might be payed out of public funds they do not 'work' for the government - the state - the legal rational being obvious since as stated in the replacement answer "the criminal prosecutor or deputy prosecutor, also known as the state"
answer 3
A criminal prosecutor represents the people of the state and works for the government, while a criminal defense attorney represents the accused defendant in the criminal case. It is the prosecutor's job to prove beyond a reasonable doubt that the accused criminal defendant is guilty of the crime charged in criminal court. In contrast, it is the criminal defense attorney's job (among other things like providing legal analysis and legal representation) to create reasonable doubt as to the crime charged to the criminal defendant. All criminal prosecutors work for the government. Criminal Defense Attorneys either work for the public defender's office or are in private practice. For more info on criminal defense law www.occriminallaw.com Criminal defense attorneys begin their careers as criminal prosecutors working for the district attorney's office and then switch sides to criminal defense and go into private practice.
In short, it is the criminal prosecutor's duty to prosecute a criminal defendant in order to get a guilty plea/verdict against the criminal defendant so as to subject the defendant to criminal penalties/fines/etc; It is the criminal defense attorney's job to represent the accused and vindicate the defendant of criminal culpability/liability.