You divide the denominator into the numerator and get a remainder, then you continue to divide the numerator into the remainder (or n times the remainder) to get the decimal expansion. There are only finitely many remainders, so it will repeat or end.
Look at the classical division algorithm: after you have exhausted the digits of the numerator, you will continue appending zeroes 'past the decimal point'. As the remainder is smaller than the divisor, it is finite and the same values will come back periodically. The period length of the decimals cannot exceed the value of the divisor minus $1$.
Base $10$ example, $83/7$:
$83\div 7=10$, remainder $1$ ($=8-7$).
$83\div 7=11$, remainder $6$ ($=83-7\cdot11$).
$83\div 7=11.8$, remainder $4$ ($=830-7\cdot118$).
$83\div 7=11.85$, remainder $5$ ($=8300-7\cdot1185$).
$83\div 7=11.857$, remainder $1$ ($=83000-7\cdot11857$).
$83\div 7=11.8571$, remainder $3$ (=$\cdots$).
$83\div 7=11.85714$, remainder $2$.
$83\div 7=11.857142$, remainder $6$.
$83\div 7=11.8571428$, remainder $4$.
$\cdots$
Conversely, when you have a periodic number, if you shift it left by one period and subtract the original, you obtain a terminating number by cancellation of the decimals.
$$11857142.8571428571428571428\cdots-11.8571428571428571428\cdots=11857131,$$ hence the number is
$$\frac{11857131}{999999}=\frac{83}7.$$
Best Answer
Your intuition is correct for instance for all $b > 2$, $\frac{1}{b-1}$ is not going to have a finite representation, and will have the representation $\frac{1}{b-1} = 0.1111111...._b.$ Eg, $\frac{1}{9} = .11111111$ in base 10.