When all the witnesses for the prosecution have been heard and the prosecution case has closed, the defendant can, in an appropriate case (this is rare), submit to the magistrate that there is no case to answer.
The defendant asks the magistrate to dismiss the prosecution's charge without hearing from the defendant, on the basis that the prosecution has not produced sufficient evidence to support the charge.
If the magistrate agrees, the charge is dismissed and the case is over. If the magistrate does not agree, the defendant must present her or his case.