In the Time Complexity section of this Wikipedia article, it states
In the algorithm as written above, there are two expensive operations during each iteration: the multiplication s × s, and the mod M operation. The mod M operation can be made particularly efficient on standard binary computers by observing that $k ≡ ( k \mod 2^n ) + ⌊ k / 2^n ⌋ ( \mod 2^n − 1 ) $
This says that the least significant n bits of k plus the remaining bits of k are equivalent to k modulo $2^n−1$. This equivalence can be used repeatedly until at most n bits remain. In this way, the remainder after dividing k by the Mersenne number $2^n−1$ is computed without using division.
I am having difficulty understanding what this is saying. Is it presenting a method for calculating the residue that is faster than long division? What is $k$? Is there two different types of "mod" where the first is a binary operator and the second means instead of being equivalent the equation is congruent? I find it hard to understand how one formula can have two "mods".
What do bits have anything to do with this?