First, we must determine what we mean by "impartial." A jury is impartial if it is willing to consider all evidence for and against a defendant fairly. Note that impartiality does not require that the jury have no opinion coming into the trial. This may not be possible. But impartiality does demand that the jury be able to put aside any preconceptions and give fair consideration to all evidence.
The only practical way to find impartial jurors is through the process of voir dire. The potential jurors are questioned by the judge and by the lawyers from each side. The questions are crafted to try to get at the issue of whether the potential juror can actually give both sides of the case a fair hearing. It is, of course, difficult for judges and lawyers to truly know what is in the mind of a particular prospective juror. However, there is no other way to find an impartial jury. We cannot simply base jury selection on demographic factors like age or race or level of education. We can only question the potential jurors closely while trying our best to determine what is in their hearts and minds.