You'll notice that after running your code, i == 20 is False. Actually you'll have 20.000000000000327 > 20.0. This is not unique to Mathematica, you'll find it in almost any language. It's important to be aware of this when doing any kind of programming involving floating point numbers.
The reason is the accummulated errors from the repeated addition, and the fact that 0.01 is not exactly representable in binary (the way the computer stores floating point numbers), so the actual value is slightly larger.
Mathematica uses machine precision floating numbers by default for performance reasons, but you can do better: try i = i + 0.01`10 instead, which will use Mma's built in arbitrary precision arithmetic with 10 digits of precision, and it'll do precision tracking too. Or use exact numbers: i = i + 1/100
The best thing though is not to use For loops at all as a beginner. Use Table, Map, Fold, etc. or use Do for the "standard" for loops.