The way the criminal justice system works varies from state to state. This is how the process goes in Pennsylvania:
1.) You are charged with a crime
When you are charged with a crime, the police file a complaint with the district magistrate where you are alleged to have committed a crime.
2.) You are arraigned
You are brought in front of a judge and informed of the charges against you. Bail is set and you are given a copy of the criminal complaint. You are also given a date for your preliminary hearing.
3.) You are given a preliminary hearing.
The Commonwealth presents the evidence against you. If they show evidence that a crime is committed and that you are accused of doing it, the charges will be sent up to the Court of Common Pleas.
4.) You are formally arraigned
The Court of Common Pleas gives you a date for your pre-trial conference and officially arraigns you on your charges.
5.) You have a pre-trial conference.
You have a date at the Court of Common Pleas where you pick your trial date
6.) You have your trial date.
You have a jury trial, non-jury trial, or enter a plea.
7.) You are sentenced.
If you are found guilty or enter a plea, the court gives you a sentence. The sentence depends on how many crimes you have committed in the past and the grading of the offense you were convicted of.
8.) You may be able to appeal.
If your rights were violated at trial, you can appeal or file a post-conviction relief act petition (PCRA).