Taking the last digit is the same as dividing by $10$ and taking the remainder.
If we call the expression $a \equiv_n b$ to mean $a$ and $b$ both have the same remainder when divided by $n$, we can notice that if $a \equiv_n a'$ and $b \equiv_n b'$ then $ab \equiv_n a'b'$ and $a + b \equiv_n a' + b'$. (For example: the last digit of $3,456\times 7,482$ is the same as the last digit of $6 \times 2$. Same thing if you do addition.)
If you start with $a \times 1$ and $a \times 2$ and $a\times 3$ eventually you will get a point where $a \times k$ is a multiple of $n$. (After all $a\times n$ is a multiple of $n$ but you may reach it earlier.)
When you get $a \times k$ is a mutliple of $n$ then you have $a\times k \equiv_n 0$ as the remainder is $0$. And then $a\times (k+1) \equiv_n a$ and the whole thing repeats in an infinite loop.
So...... You will always get a repeaiting infinite loop. The question is when will the infinite loop contain all values and we only some?
Well, if $a\times k = N$ and $N$ is the least common multiple of $a$ and $n$ you will get a loop of $k$ different values. Now if $a$ and $n$ are relatively prime--- that means they have no other common factors other than $1$--- then the least common multiple is $a \times n = an$ and your loop contains all values.
So for any odd number other than a multiple of $5$ you get an loop of length $10$ with all digits.
On the other hand if $a$ and $n$ have a greatest common divisor $> 1$, then you will have an infinite loop but it will only contain multiple of the greatest common divisors.
So for instance if you do $5$ it will contain the multiples of $5$. $5,0,5,0,.....etc.$ If you do and even number such as $6$ you will get all the multiples of $\gcd(6,10) = 2$. $6,2,8,4,0,6,2,8,4,0,.... etc.$