Depending on the facts and circumstances of your case, there may be pretrial motions that need to be filed and there may need to be hearings before the judge on those motions. Sometimes, these motions and hearings occur before the final decision about whether to proceed to trial and sometimes they occur after the decision has been made to proceed to trial. Similarly, depending on the case, the court, the issues, and the judge, the motions may sometimes get heard by the judge well before trial or may not get heard until the time of trial. The most common contested motion is a Motion to Suppress Evidence.
The trial court may suppress some or all of the evidence against you if your constitutional rights have been violated. For example, if the police officer did not have specific, articulable facts amounting to reasonable suspicion to make a traffic stop, then the initial stop would be unlawful and any evidence obtained thereafter is not admissible against you at a trial. Similarly, if the legal procedures for a breath test were not followed in your case, then the breath test results may not be admissible in your case. Sometimes, for strategic reasons, it is better and wiser to leave these issues to be resolved at trial. Whether and how this occurs will depend on the facts and circumstances of your case.