Finding a square root means guessing, then improving the guess until it stops changing
Unless a whole number is a perfect square, its square root is irrational and its digits never end. So no algorithm finds it exactly. Instead, most methods start with a sensible guess and refine it again and again, a strategy people have used since Babylonian scribes in the 17th century BCE.
Those Babylonians worked out the square root of 2 to three base-60 places after the 1, though nobody knows exactly how. They did know a shortcut for estimating the diagonal of a rectangle, such as a gate, and may have used something similar. The first procedure we can clearly identify is Heron's method, from first-century Egypt, which turns out to be a special case of what is now called Newton's method. Modern analytic techniques took off only after Arabic numerals reached western Europe in the early Renaissance.
The choice of method depends on what you have to hand. Some suit mental arithmetic, some need paper and pencil, and others are designed for computers. Designers weigh how many rounds are needed for a given precision, how expensive each operation is, and how errors build up. Division is often slow on machines, so it can pay to compute the reciprocal of the square root instead. Other approaches produce the answer one digit at a time, use Taylor series, or generate fractions through continued fractions. A few, like series expansion, need no starting value at all.
For the iterative kind, the starting guess matters a lot. It must be a positive number between 1 and the number itself, and a guess far from the answer wastes rounds just finding the right order of magnitude. Curiously, with Newton's method a first guess slightly too high converges a little faster than one slightly too low.
Quick estimates come in several flavours. The crudest picks a single number for a whole range and is very inaccurate. The standard approach fits a straight line to a small stretch of the square root curve, and a least-squares line gives the best average result. Nearly every computing device now has a square root function built in somewhere, whether in hardware or software.
Source: Square root algorithms