Any communications to me that you wish to be considered confidential are protected by the Attorney-Client privilege and will remain confidential. This is true even if you consult with me, share a confidence with me, and then decide to hire someone else. I will still be required to keep your confidences to myself and no law enforcement can get to this information. This is a sacred and well protected privilege that prevents anyone from forcing your attorney to reveal your confidences. But there are certain limitations on this privilege which you should be aware of before revealing a confidence.
First, if a 3rd party is present during your communication to your attorney, the privilege may not apply. For example, if your mother or daughter are present in the attorney's office when you make what you intend to be a confidential disclosure, a prosecutor could argue that the communication loses its protection because it was stated in front of a 3rd party and can no longer be considered "confidential". There is no mother-daughter privilege and, technically speaking, a prosecutor who learned about this 3rd party disclosure could subpoena your mother or daughter and force them to testify to what was said in their presence. Although this rarely happens in practice, it's important that you be aware of this and understand why I might ask your mother or daughter to leave the room at certain points during the discussion. It's for your protection.
Another thing to be aware of is that Attorney Rules of Professional Conduct have recently changed to permit a limited exception to the privilege in certain, very specific, circumstances. Generally, if an attorney has a reasonable belief that death or great bodily injury is going to occur *in the future* unless disclosure is made, then the attorney may be required to disclose this. Note that this only applies to *future* behavior, not to anything that occurred in the past. If you tell me in confidence that you murdered and buried in your backyard 18 police officers, that information would remain confidential and protected by the privilege, and I would not be allowed to disclose it nor could anyone force the information from me.
It is important that you give your attorney the truth and nothing but the truth. Criminal Defense lawyers are trained to deal with bad facts, we know how to fight cases with even the worst facts, don't assume that by hiding bad information from me that it will help your case; indeed, it will almost certainly hurt your case. It's hard to imagine anything worse for your case than having me learn a bad fact for the first time in court in front of a judge and jury. Don't take that chance, tell your lawyer everything.
Finally, it's also important for you to know that I respect the Rules of Professional Conduct and the law and I always play by the rules. I know how to fight cases playing by the rules, there is no need for me to do anything illegal or unethical in order to win, we can win playing by the rules that are set up to protect fairness. One of the implications of this is that I will never knowingly allow any witness to testify to a fact that I know to be false. If a witness says to me "I can say whatever you want me to say, tell me what to say", I am not going to be a party to perjury. I will simply ask that witness to tell the truth however they see it. I will always do this in advance of trial in order to be sure that I know what the answer is before I ask any questions in court. Don't assume that you can have friends manipulate the evidence by being coached by your attorney! It won't happen.
Another significant implication of this for you, is that I will not allow you to testify to something that you have previously told me is not true. Although I will always expect and require you to tell me the truth when you communicate with you, you must also understand that I am bound ethically by whatever you tell me, even confidentially. You are an adult and capable of making your own decisions, I am not here to judge you or decide what you will or will not share with me. If you tell me that you put the gun against the victim's head and then pulled the trigger, I will not put you on the stand and allow you to tell the jury that you weren't there and didn't do it. But I can still defend you and still win your case without using this testimony, and I have done this many times in many cases. So don't let this stop you from sharing the truth with me. Just be aware that anything you tell me can have an effect on my available tactics at trial.