Many clients think that their next court appearance is their trial, and then are surprised to learn that it's just a "pretrial hearing". Pretrial hearings are common and frequent and there will usually be several before any actual trial takes place. In criminal cases, a "trial" is usually in front of a jury (it's rare that you will ever want to trust a single judge with your fate, as opposed to a full jury).
A jury trial starts with the lawyers and judge setting aside some time to go over pretrial motions. These are called "in limine" motions and are requests to the court to set the rules for the trial. What evidence comes in, what evidence stays out, which witnesses can testify, which cannot, that sort of thing. Once the judge has heard all the in limine motions, the parties then begin jury selection. It's not entirely accurate to think of it as "jury selection", because you don't really get to "select" who's on your jury. A large group of potential jurors will be summoned into the courtroom at random based on driving and voter registration records, starting with the jury box and then filling up the rest of the courtroom. The judge and lawyers then take turns asking the potential jurors questions. This process is called "voir dire" and it's the only chance your lawyer will have to speak conversationally with all the potential jurors. If it appears during questioning that a particular juror is not capable of serving, the juror may be excused "for cause" by the court. After all sides have had their chance to talk to the jurors, and all the jurors "for cause" have been excused, the prosecutor and defense then take turn exercising "peremptory" challenges, which is the act of excusing a juror without having to provide any reason. Each side has a limited number of peremptory challenges. So it's more accurate to say that you can eliminate those you don't want on your jury, even if you can't choose who stays.
After both sides have exhausted their peremptory challenges, the jurors remaining in the jury box are sworn in as the jury. In long trials, "alternate" jurors are often selected as well. When jury selection is complete, the prosecutor then is required to make an Opening Statement. This is the government's summary of what the evidence is going to show at trial. The prosecutor will make the defendant look very bad and tell a very slanted story of what he intends to prove. He will then ask the jury to vote guilty after they've heard all the evidence, and then he'll sit down. At that point the defense has the option of either making an Opening Statement of their own, or waiting until they present their evidence to make an Opening Statement. It's rarely a good idea to reserve the Opening and almost always better to make the Opening Statement at that point, giving you the opportunity to present your view of the evidence before the jury hears any evidence. In this way, your lawyer can set the tone of the trial and the language of the case before any evidence comes in. It's a huge opportunity that should rarely be passed up.
After Openings have concluded, the prosecutor begins presenting witnesses. After he is through asking questions of the witness, the defense is allowed to "cross examine". The defense has wide latitude to cross on any topic the witness testified to, and to ask "leading" questions (which are not permitted during the witness's initial direct questioning). Each witness proceeds in this fashion until the prosecutor rests his case. At that point, the defense will usually make what are called "halftime motions", based on any failures of the government's case. After the judge has ruled on halftime motions, the defense begins its case. The defendant has no burden to produce any evidence and is not required to call any witnesses, but in most trials there will be some defense witnesses. The same routine is followed with direct questioning by the defense lawyer, followed by cross examination by the prosecutor.
Once both sides have rested, the judge then instructs the jury on the law. The instructions are not given from memory, every single word is written down and agreed upon by the lawyers and the judge before they are presented to the jury. Instructions are critical, as the jury is likely to give them a tremendous amount of weight during their deliberations. More cases are reversed on appeal based on instructional error than anything else.
After instructions have been read to the jury, the prosecutor then has the opportunity to make his closing argument. He's entitled to argue any reasonable inferences from the evidence, but he is strictly prohibited from adding any personal opinions or beliefs. Any improper personal comments during the prosecutor's closing argument may be grounds for later reversal of a conviction. The defense then has the opportunity to provide a closing argument. This is where the case is summed up and all the evidence is tied together to bring home the main points at trial. This is often where cases are won or lost. After the defense lawyer is finished with his closing argument, he sits down and the prosecutor has the opportunity to make one last rebuttal argument. Since the prosecutor has a very high burden requiring him to prove his case "beyond any reasonable doubt", he is given the first word and the last. The defense cannot respond to this rebuttal argument.
Once the prosecutor finishes his rebuttal argument, the case goes to the jury for their decision. In order to reach a verdict, the jury *must* be unanimous. That means that all of them must agree that the defendant is guilty in order to convict, and all of them must agree that he is Not Guilty in order to acquit. Anything less than unanimous results in a "hung" jury, causing a mistrial. The government can re-try a case after a mistrial based on a hung jury, and the defendant can appeal after a verdict of guilty, but the government cannot appeal a verdict of Not Guilty.