The role of a defence lawyer is widely misunderstood but it's important to understand if you are ever in trouble and need a lawyer.
A defence lawyer's job is to get the best possible result for the accused consistent with the directions of the accused and legal ethics.
That means that a defence lawyer has to be completely loyal to the client - there can be no other interests represented but the client. And it also means the defence lawyer must follow the lawful directions of the client.
So if the client says "I will not plead guilty" the lawyer must follow that instruction even if the lawyer thinks it's the wrong decision. If a client says "I am going to testify at trial" that's the client's decision and the lawyer has to accept it regardless of whether or not testifying is prudent. The lawyer gives the best information and advice the lawyer can but the client decides.
The lawyer's duty of loyalty means that anything the lawyer learns from the client remains a secret between the lawyer and the client. Even if the client admits to a terrible crime, the lawyer must keep that confidential. This means the client can be fully open with the lawyer.
Now this doesn't mean the lawyer can hide evidence or intentionally mislead the Court. But the lawyer had no duty to tell what confidences learned from the client - in fact the lawyer has the duty not to disclose what the lawyer has learned.
In terms of getting the best result, that means the lawyer needs to do what is best for the client. That doesn't mean always doing a trial or arguing every issue. Sometimes a conviction is inevitable and a guilty plea is prudent. If the client agrees then it is often better to plead guilty and look for the best sentence possible.
As a client this means several things. First you can be open with your lawyer and say what happened. Second, while you should listen to what your lawyer suggests, it is your decision whether to go to trial and whether to testify or not. Remember it's your life - don't be shy to do what you think is best.