The definition of a rational number is:
Any number that can be made by building a fraction
using whole numbers.
You can make 0.123 that way. Here's the fraction: 123/1000
It's also handy to know that any number that's completely
written down using digits ... and a fraction bar or a decimal
point if they're needed ... is a rational number. This is not a
definition, and it doesn't cover all rational numbers, but it's
handy sometimes.
It's also handy to know that a decimal that has a set of digits
after the decimal point that repeats forever is a rational number,
even though you can't completely write it down (because it never
ends).