After you are arrested, police will take the results of their investigation to the Crown who decides whether to proceed with a prosecution. If you have been charged with an indictable offence that carries a sentence of 14 years in prison or more and you choose to have your trial at the Superior Court of Justice, you or the prosecutor can ask for a preliminary hearing.
If you have been charged with a co-accused and one of you asks for a preliminary hearing, you both must attend unless the court agrees to hear your cases separately. This would be done by making a severance application and you or your co-accused would have to prove that it would be unfair to have a single trial.
A preliminary hearing is much like a trial with the Crown tasked with proving there is enough evidence to justify a trial. The prosecution does not have to prove guilt beyond a reasonable doubt, which is the case in a criminal trial.
Typically, the Crown will present the most important parts of the evidence against you and may call witnesses to testify. You are allowed to cross examine any witnesses, call your own witnesses and present evidence. An accused does not have to mount a defence. The hearing is often used as a discovery tool by the defence, giving you the opportunity to look for inconsistencies that can be brought out at trial.