Class C misdemeanors prosecutions begin with the filing of a complaint, a written affidavit made by a credible person charging the defendant with an offense. These are under the jurisdiction of the municipal or justice of the peace courts.
Class A and B misdemeanors are in the County Courts at Law. An information, or written statement presented by the State, charges the defendant with committing a crime. A complaint must be filed with the information.
Felonies are prosecuted in district courts and an indictment is required (unless waived by the defendant). The indictment is the written statement of a grand jury presented to the court accusing the defendant of the crime.
Sometimes, the charging instrument, such as the complaint or indictment, has a flaw. A good criminal lawyer trained to recognize these flaws can file a motion to have the charge thrown out. The prosecutor can then either correct the charge or, hopefully for the criminal defendant, not pursue the charge any further.