The difference? For and while loops

Like these, whats the difference and when is the other more useful than the other?

var i:Number = 0;
while (i < 5) {
trace(i);
i++;
}

for (var i:Number = 0; i<=5; i++) {
trace (i);
}