My background. I am a school student. Recently, we learned about rational numbers and irrational numbers. For example, we were told that rational numbers can always be written as a repeating decimal, that $\pi$ is an irrational number, and that the decimal represantion of irrational numbers aren't periodic (that is, the decimal places 'go on forever'). I was very curious about these things and asked the teacher why these facts he told us are true. I was really interested if there is some sort of argument that somehow shows that the decimal places of $\pi$ go on forever, for example. The answers of the teacher were very dissappointing: he just said that this isn't part of the curriculum. Obviously, this means that I have to find out these things on my own initiative.
My question. In this present question I am for now just interested in why the standard algorithm one uses to calculate the decimal places of a number is correct. We learned that one can calculate the decimal expression of a rational number $\frac{a}{b}$ by calculating: $$a :b \quad=\quad p_1\text{ Remainder }r_1\\ r_1\cdot10 :b \quad=\quad p_2\text{ Remainder }r_2\\ r_1\cdot 10 :b \quad=\quad p_3\text{ Remainder }r_3\\ \vdots$$ Now I am wondering why $p_1.p_2p_3\dots$ is a decimal expression of the number $\frac{a}{b}$. In other words: why is $p_1 + p_2/10 + p_3/100 + \dots = \frac{a}{b}$? How can one prove this?