If you are charged with a crime you have the right to legal representation, so the first thing to do is contact criminal lawyers who can work with you to get the best result. Remember you don’t have to answer any police questions without your lawyer present, except to give your name and address.
While a lawyer will advise you, you are the only one who can decide whether a plea of guilty or innocence should be given. Depending on what the offence was, you may be charged and released on bail. Otherwise, if not given bail you will have to remain in custody until the matter is settled.
If you plead guilty and are released on bail, you may be given the option to not appear in court. Your case can be heard without your presence and you’ll be notified by mail of the penalty. If you plead not guilty, the trial must go ahead and you will need to attend. You should always have a lawyer to represent you as they know the law and can speak on your behalf, saying things in your defence that you may not have thought of.