You divide the number by ALL primes <= sqrt of the number in question: is 97 a prime?
Sqrt(97)=~10. Then you divide 97 by ALL primes < 10. In other words, you try and divide 97 by:
2, 3, 7. Since it doesn't divide any of these 3 numbers EVENLY, then it is a prime.