When you are charged with a crime, your case enters the criminal court system. It will remain pending until it reaches a disposition. When your case is disposed, it is finished and removed from the court's docket. Possible dispositions include a dismissal, a guilty plea, or a finding of guilty or not guilty at trial by either a judge or jury.
After reviewing your case, either before it goes to court or in court, the prosecutor may decide to dismiss it. For example, if the arresting officer fails to appear at your hearing, the prosecutor might dismiss your case, although the judge can grant the prosecutor a continuance, assigning a new court date instead. This is likely with serious charges. The prosecutor might also decide that the evidence against you is insufficient to prove your guilt at trial and therefore dismiss the case against you.
In some cases, your attorney may challenge your arrest, such as because authorities allegedly violated your Fourth Amendment rights against illegal searches and seizures. If the judge rules you were arrested or searched illegally after a hearing and suppresses evidence the prosecution needs to prove its case against you, the prosecutor will likely dismiss your case if this leaves him with insufficient other evidence against you.
Guilty pleas often follow negotiated plea deals between your attorney and the prosecutor. In some cases, the judge may also be involved in this process. In a plea agreement, you agree to plead guilty to a charge in exchange for a specific sentence. Sentences range from court supervision to probation to jail or prison time. In many cases, the prosecution reduces the charge against you as an enticement for you to plead guilty. If you accept a plea deal, you case is disposed.
As a criminal defendant, you have the right to a trial where the prosecution must prove your guilt beyond a reasonable doubt. Depending on the nature of your case, you may have the choice between a jury or a bench trial, where the judge alone decides the verdict. If you are found guilty, your case moves to the sentencing phase before it is finally disposed, but if you are found not guilty, your case is removed from the court's docket and is finished – or disposed.
If you plead guilty or were convicted of a crime, this does not necessarily mean you have a permanent criminal record. In some cases and after a waiting period, you may be able to have arrests and convictions for minor crimes expunged or sealed. Expungement usually means that your case is erased from the records of the criminal justice system as if it never happened. If your case is sealed, it still exists in the system, but the information cannot be publicly accessed during a background check, for example. Law enforcement can usually still access it, however.