A decimal terminates if the fully reduced fractional form of the number has nothing but factors of 2's and 5's (and 1's, of course) in the denominator.
For example, the following do NOT terminate: 2/19, 2/3, 1/17, 5/11, 7/15.
The following DO terminate: 1/20, 3/5, 373/500, 12/48 (because even though 48 has a factor of 3, in
fully reduced form 12/48 = 1/4, which has only 2's in the denominator).
Why does this rule work? Because 2's and 5's are the components of 10, and our decimal system is base 10. Putting terminating decimals into fractional form can be easily done: the numerator consists of the digits after the decimal, the denominator of a power of 10 with the same number of zeros as the number of digits in the numerator.
For example:
0.123 = 123/1000 (3 digits after decimal)
0.45809 = 45,809/100,000 (5 digits after decimal)
0.7 = 7/10
So if you are asked whether x/y terminates, it depends on whether factors in x cancel all (any) non-2 or non-5 factors of y from the denominator.