How long division works
Long division breaks a large division problem into a sequence of smaller steps. At each step you ask how many times the divisor fits into the current portion of the dividend, write the partial quotient above the line, multiply the divisor by that digit, subtract, and bring down the next digit. This repeats until all digits have been processed.
If the divisor does not divide evenly into the dividend, a remainder is left after the final subtraction. The result can be expressed as a quotient with a remainder (e.g., 17 / 5 = 3 remainder 2) or continued as a decimal (17 / 5 = 3.4).