When charged with a crime you have several rights to exercise. You can have a lawyer to represent you and have him beside you when you talk to the police about the crime. In any case you are not obligated to speak to the police.
You can questions the witnesses produced against you and subpoena them. You can opt for a pre-trial hearing wherein you can challenge the evidence the State will produce against you in the actual trial. Only if the evidence is very strong you will be convicted. You can also testify the trial or keep silent.
An attorney can help to represent you and gather the strongest evidence possible for this purpose in court. He will refute the prosecution’s allegations and also protect you from any illegal evidence or false evidence produced by the prosecution. He will also help to save you from collateral consequences if you plead guilty to the crime by entering into negotiations with the prosecution.
If you are convicted/plead guilty the main consequences will be jail, penalties, community service, education and counseling, non-usage of chemicals such as drugs/alcohol, probationary terms, no-contact and home monitoring electronically. The collateral consequences will be cancellation/suspension of professional license/driving license (road accident case), orders not to hold firearms in case of felony and registration as predatory offender.