Erk. Looks kinda nasty. Its pretty easy really! The first bit, i=0, tells Java that you want to start counting at the number zero. The second bit is just like your boolean condition in the while loop. The last bit is what you want to do every time the first bit of the for loop gets executed. So, using the same example as the while loop, here it is in for loop form.
There are times that you will want to use a for loop instead of a while loop and vice verca although you probably wont realise until you actually try writing some code and realise that one or the other is neater or does what you want better than the other.