Every time I used for loops, I always did:

for i,v in pairs() do
--code here
end

However, ever since my friend used ipairs, I've gotten the gist to use it more commonly than pairs. Yet, I don't understand the difference? Is there a critical affect to using one, rather than the other?