Do you know how long division by hand works? Subtract the largest multiple of $a$ from $b$.
That will be the quotient (value before the decimal point). Let the difference (reminder) be $d$. Then put a decimal point and consider $10 \cdot d$. Repeat the procedure to as many decimal values needed or until you get a repeated $d$.
Eg: Consider $\frac{25}{7}$
$$25 = \underline3\cdot 7 + 4 \tag{3.}$$
$$\color{red}{3}\cdot 10 = 30 = \underline4\cdot 7 + 2 \tag{3.4}$$
$$2 \cdot 10 = 20 = \underline2\cdot 7 + 6 \tag{3.42}$$
$$6 \cdot 10 = 60 = \underline8\cdot 7 + 4 \tag{3.428}$$
$$4 \cdot 10 = 40 = \underline5\cdot 7 + 5 \tag{3.4285}$$
$$5 \cdot 10 = 50 = \underline7\cdot 7 + 1 \tag{3.42857}$$
$$1 \cdot 10 = 10 = \underline1\cdot 7 + \color{red}{3} \tag{3.428571}$$
The last reminder $3$ is a repeated one and the repetition starts at the decimal starting with $4$, so the value is $3.\overline{428571}$