Yeah, the for command is a type of loop.
Using the example Loriel used:
NPC Code:
for (a ; b ; c)
a is usually where the variable initialization takes place.
NPC Code:
i = 0;
b is where the program checks whether or not the requirements to meet the loop are met. If the requirements are met, the loop is peformed and c is done.
NPC Code:
i < 10;
c is the increment.
NPC Code:
i++
Becareful not to place yourself in infinite loops...
NPC Code:
for (i = 0;i < 10;i--)
...such a case.
Hope I did not confuse you more than you were before

.