Say you have a number like
12.34
That is, 12 and 34 hundredths. 0.34 is the same as 34/100, so
12.34 = 12 + 34/100 = 1200/100 + 34/100 = 1234/100 = 617/50
If you have a number with repeating digits in the decimal, like
12.343434... (with 34 repeating forever)
we can let x be this number. Then
100x = 1234.343434...
If we subtract x from 100x, we can eliminate the repeating decimal part:
100x - x = 1234.343434... - 12.343434...
99x = 1234 - 12
99x = 1222
Then solving for x gives the decimal as a fraction:
x = 1222/99