If you have been charged with an offence and have to go to court, it is a very good idea to see a lawyer as soon as possible.
When you see a lawyer, everything you tell them is confidential. A lawyer cannot tell anyone what their client has told them unless the client gives permission. A lawyer will be able to discuss with you whether you should plead guilty or not guilty, the likely range of penalties you will receive and how to prepare for your court case.