for is used to create a loop that iterates through a range of values. The most common form is a loop to count through numeric values:
for i in range(10):
This would print the numbers from 0 through 9.
The form you quoted above is an abbreviation. If you omit the
range() function GDScript will assume it.
Note you can also iterate through arrays, strings, and dictionaries as well.
See here for more details: