First of all $123^n = (120+3)^n = (12\times10+3)^n = \sum_1^n \binom{n}{k}\times(12\times10)^k\times3^{n-k} \equiv 3^n \pmod {10}$, because all multiples of $10 \equiv 0 \pmod {10}$. So it's only needed to solve $3^{25} \pmod {10}$
This reduces it to $3^n \equiv 3^{n+4k} \pmod{10}$. Why $4$? As @André Nicolas stated, this is because of Euler's theorem saying $a^{\varphi(m)}\equiv 1 \pmod m$, if $\mathrm{gcd}(a,m) = 1$. This means $3^n \pmod {10}$ will only hit numbers coprime to $10$, and these are the four numbers $\{1,\,3,\,7,\,9\}$. None of these numbers share a divisor with $10$. This also means that $3^n \pmod {10}$ cannot hit $\{0,\,2,\,4,\,5,\,6,\,8\}$, since for instance there is no number $n$ such that $3^n = 4 \pmod{10}$. So since it can only hit the four numbers $\{1,\,3,\,7,\,9\}$, it will only do so, and repeat once it has hit the four numbers.