Power Cycles

Look only at the last three digits of 2^{i}, with i=1,2,3,...
Eventually the series starts to repeat earlier values.
At what value of i does it repeat, and how long is the cycle?
 Do the same for the last three digits of k^{i}, (2 < k < 20).
 Do the same for the last N digits of k^{i,} (1 < N < 5).
A spreadsheet is a good tool for this puzzle.
Can you explain this phenomenon?
Source: Original. Based upon a puzzle from reader Jimmy Chng Gim Hong.
Solution
Mail to Ken