for i,v in pairs is a common loop.
It's entire syntax is- for i,v in pairs (table) do.
The "table" can be replaced with game.Workspace:GetChildren(), for example, making the syntax for the first line for i,v in pairs(game.Workspace:GetChildren()) do
In basic terms, what this does is goes across every value in a table and will reference it as you've put forth in the loop.
I is the number of times it has ran, in a sense. V is the object it's referring to in the table.
In fact, the reason why the two most common variables for it are i and v, is because they stand for index and value. Indexing how many times it has ran, and running through each value. Keep in mind you can use any value for i and v; I instinctively use a and b.
Here's an example:
x = {"Hello", "How are you", 666}
for a,b in pairs(x) do
print(b)
end
This would run the loop three times, for each value in the table. Since it's running three times, each time, referencing bas the value in the table it's running with, and you can print both string values and number values, it will print-
>>Hello
>>How are you
>>666
This is the basis of it.
1 comment
While we're at it, here's a link to the difference between pairs and ipairs. https://scriptinghelpers.org/questions/4/whats-the-difference-between-pairs-and-ipairs#9