After an arrest, you are brought in for a preliminary arraignment or have the criminal charges mailed to you. After the preliminary arraignment is a preliminary hearing where the prosecutor has to show that there's enough evidence against you to take you to trial. The formal arraignment and pre-trial conference come after the preliminary hearing and are where you are given official notice of the charges you will face at trial. After the trial, you are sentenced and have the right to file post-sentence motions and a direct appeal. If the direct appeal isn't successful, you can file a PCRA or federal habeas.