You count the number of decimal places and write 1 followed by as many zeroes as there are decimal places. Then you take the figures after the decimal point as a whole number and divide by the number made up of the 1 and zeroes. That's your fraction. Example: 7.3125. 4 decimal places means we create the number 10000. Use this as the denominator: 3125/10000. This cancels down by dividing by 25 top and bottom: 125/400. We can divide further by 25: 5/16. So 7.3125=7 5/16. Another example: 0.0124=124/10000=31/2500.
What about recurring decimals? This time we write a row of 9's with as many 9's as their are recurring portions of the decimal: 0.285714285714285714... The recurring part is 285714 and so we need 6 nines in a row: 999999. We use this as the denominator with the recurring numbers as the numerator: 285714/999999=2/7. Another example: 1.076923. The fraction part is 76923/999999=1/13 and the number is 1 1/13.
But what about 0.166666...? The recurring part doesn't start till after the 1. Multiply by 10 to move the decimal point: 1.666666. Now the recurring part is just 6 and the fraction is 6/9=2/3 and the complete number is 1 2/3 which we make into an improper fraction: 5/3. But we need to divide this by 10 because we multiplied by 10 earlier: (5/3)/10=5/30=1/6. Let's try another: 0.041666666... Multiply by 1000 to move the decimal point 3 places: 41.666666... which is 41 2/3=125/3. We now need to divide by 1000: 125/3000=1/24. Example: 7.00333333... Put the 7 aside for a moment. 0.00333333... Multiply by 100: 0.33333... which is 3/9=1/3. Now divide by 100: 1/300, and put the 7 back: 7 1/300.