The pretrial procedures may be different for criminal and civil cases, and may also depend on the severity of the crime in a criminal case.
Briefly, in a criminal case, the first appearance in court is the arraignment. Here, formal charges are read to the defendant and the judge may make a decision whether there was probable cause for the arrest. Bail is often set at this arraignment. Here also the defendant may formally enter a plea, guilty or not guilty.
Next there could be a preliminary examination where prosecutors show to the judge’s satisfaction that a crime was committed by the defendant. If the prosecutor is successful then the judge will approve the charges.
Next there is discovery, where both sides exchange evidence and witness lists.
Final there are motions made by both sides for the judge to rule on. For example, there may be motions to dismiss the case, to suppress or admit evidence, etc.
Again this is a very general answer and the procedures may differ depending on the charges and the court that the case in is.