Divide by the smallest prime number possible. If the number under the square root is even, divide it by 2. If your number is odd, try dividing it by 3 instead. If neither of these gives you a whole number, move down this list, testing the other primes until you get a whole number result. You only need to test the prime numbers, since all other numbers have prime numbers as their factors. For example, you don't need to test 4, because any number divisible by 4 is also divisible by 2, which you already tried.
2