By "long division" algorithm, he just means the standard way you divide one number by another: to divide 3 by 7, you would write out a 3.00000000000000000, with as many 0s as you felt you needed and start dividing:
7 divides into 30 4 times with remainder 2 so you write "4" above and "bring down" a 0 beside the 2.
7 divides into 20 twice with remainder 6 so you write "2" above and "bring down" a 0 beside the 6.
7 divides into 60 8 times with remainder 4 so you write "8" above and "bring down" a 0 beside the 4.
7 divides into 40 5 times with remainder 5 so you write "5" above and "bring down" a 0 beside the 5.
7 divides into 50 7 times with remainder 1 so you write "7" above and "bring down" a 0 beside the 1.
7 divides into 10 once with remainder 3 so you write "1" above and "bring down" a 0 beside the 3.
7 divides into 30 4 times with - but wait! That is exactly the division we did to start all this! We will get exactly the same quotient and remainder, of course, and because we will also "bring down" a 0, exactly the same sequence of divisions will repeat.
At this point we know the 3/7 is just a decimal point and "428571" repeated. Further, we knew that had to happen because the remainder at each step, when we divide by 7, must be a non-negative number less than 7. There are only 7 possible remainders so one must repeat within no more than 7 divisions.
And this is true for any rational number. To reduce the rational number m/n to decimal form, we divide m by n. But any remainder must be a non-negative number less than n. which means that within n divisions, a remainder must repeat and we will just repeat everying again, or will be 0, a "terminating" decimal, which we can then think of as "repeating 0s" or, as you have it, "repeating 9s".