Lawyers speak for their clients in court. They also speak for them outside it. Under lawyers’ professional rules, clients must communicate with represented opposing parties through their lawyers rather than directly. So prosecutors, for instance, contact the lawyers of represented defendants to discuss cases, not the defendants themselves.
To read about an occasional situation in which defendants (with their lawyers) come face to face with prosecutors, see Should I meet with the prosecution or police about my case? Also see Can criminal cases be resolved without going to court?