A irrational number is a number that can't be expressed as a ratio of two whole numbers. That's it.
For examples (in increasing order of difficulty)
1 is a rational number because it is 1/1
0.75 is a rational number because it is equal to 3/4
2.333... (infinite number of digits, all equal to three) is rational because it is equal to 7/3.
sqrt(2) is not a rational number. This is not completely trivial to show but there are some relatively simple proofs of this fact. It's been known since the greek.
pi is irrational. This is much more complicated and is a result from 19th century.
As you see, there is absolutely no mention of the digits in the definition or in the proofs I presented.
Now the result that you probably hear about and wanted to remember (slightly incorrectly) is that a number is rational if and only if its decimal expansion is eventually periodic. What does it mean ?
Take, 5/700 and write it in decimal expansion. It is 0.0057142857142857.. As you can see the pattern "571428" is repeating in the the digits. That's what it means to have an eventually periodic decimal expansion. The length of the pattern can be anything, but as long as there is a repeating pattern, the number is rational and vice versa.
As a consequence, sqrt(2) does not have a periodic decimal expansion. So it has an infinite number of digits but moreover, the digits do not form any easy repeating pattern.