Before turning a fraction into a decimal, guess first. Guess whether it's a terminating decimal (one that ends cleanly) or a repeating decimal (one where the same digits repeat forever), then check by watching the long division play out.
Turn a fraction into a decimal and some come out clean (e.g. 1/4=0.25), while others repeat endlessly (e.g. 1/3=0.333…). The difference comes down to whether the denominator's prime factorization contains only 2s and 5s, or some other prime too.
Because our decimal system is built on 10=2×5, whenever the denominator is made up only of powers of 2 and 5, the division finishes exactly. But if some other prime — like 3 or 7 — is in the denominator, the remainder in the division keeps cycling, which forces the digits after the decimal point to repeat in the same pattern too.
Good to know ahead of time: once you reduce a fraction to lowest terms, if the denominator's prime factorization contains only 2s and 5s, you get a terminating decimal; if it contains any prime other than 2 or 5 (3, 7, 11...), you get a repeating decimal. Enter a fraction, make your guess, and then watch the actual long division for yourself.