The difficulty with this question -- and it is one that has come up in the comments to several answers, but has not yet been explicitly addressed by any of the answers -- is that it appears that the number you are actually interested in is not the number you think you are interested in.
Here is a (completely hypothetical, made-up) scenario that I suspect is not too far off the mark from what is going on here. You are trying to solve some kind of problem; maybe it's "find the zeroes of such-and-such polynomial". Using a graphing calculator or some other form of computer algebra system, you graph the polynomial and then use the technology's built-in numerical tools to find the location of the zero. The calculator tells you the answer is $0.3760683761$. But the correct solution, according to the textbook, is $572/1521$. You confirm, by entering this into your calculator, that the results are equal, and want to know how you could have found the fraction yourself.
But here's the thing: those results are not equal. $572/1521$ is not $0.3760683761$. It is only approximately that. As Eric pointed out in his answer, $572/1521$ is actually equal to $0.376068~376068~376068 \dots$, with a repeating block of six digits. If you round this to fit on a calculator display, the result will look like $0.3760683761$. But that is misleading you: That truncation cannot be converted into the form $572/1521$, because it isn't equal to $572/1521$.
So the real question ought to have three parts to it:
- If I see a decimal output that appears to terminate, how can I know if it is really just a truncated form of a repeating decimal with a long block of repeating digits?
- If the "true" decimal value is actually repeating, how do I convert it to a fraction?
- If the "true" decimal value is actually terminating, how do I convert it to a fraction?
For the second part of the question, see Eric's answer on how to express a repeating decimal as a fraction.
For the third part of the question, see Elliot G's answer on how to express a terminating decimal as a fraction.
The real problem is the first part. How do you know if the decimal you see is actually the decimal you want? The answer, unfortunately, is that if you are relying on some form of technology to produce your solution, there is no way to know. Calculators are fundamentally finitary devices that work with numerical approximations. A calculator can't understand the actual value of $1/3$, it can only understand $0.333333333$ to a finite number of places. And if you see $0.333333333$ on a calculator screen, you can't really know if it is supposed to be $1/3$, or $333333333/1000000000$, or if maybe there are some other completely different digits hiding off the screen, buried deep in the decimal expansion.
More precisely, there is no way to tell from a finite string of digits whether you are looking at a part of a terminating decimal, a part of a repeating decimal, or a part of an irrational number. There is just no way. This leads to some (quite absurd) misconceptions, as for example in this page from a book for kids which blithely asserts that $8/23$ is an irrational number because its decimal expansion just goes "on and on" with no apparent pattern.
The moral of the story is, if you are expected (in a certain classroom context, which I assume is the case here) to solve a certain problem and get an answer like $572/1521$, the odds are good that you are supposed to solve it using some method that leads directly to that solution, rather than obtain an approximate numerical value using some technology and then try to reverse-engineer from it the correct value.