All prosecutors are public because they work for the state. That's why it always says "the people versus" in a criminal case.
Defense lawyers can either be paid by the state (public defenders) or private lawyers.
The difference between defense and prosecution is that the prosecution prosecutes the case. Think of the prosecutor like the "plaintiff' in a civil case. They're making the claims.
A public prosecutor prosecutes cases, which means they accuse and take a defendant to trial, on behalf of a community. For example, a district attorney, etc. A defense lawyer's job is to defend whomever the prosecutor has accused and brought to trial.
The prosecutor represents the government and tries to put you in jail. The defense attorney tries to prove that you are not guilty and keep you out of jail.
They are on opposite sides of a case. The prosecutor represents the plaintiff (the people) and the defense lawyer represents the defendant (the person accused of the crime).
The first one is paid to put people in jail. The second one is paid to keep people out of jail. It's actually a little more sophisticated than that, but this is enough to get you started.