the % operator limits the value ( in this case index) to a maximum of 49, so that its impossible to go 50,51 etc.

something similar would be:
if(index > 100) { index = 0; )

but this is bad because it doesn't consider the actual index value, it just sets it to 0.

instead index %= 49 is just an abbreviation for:
index = index % 49;

and the % means just this:
remainder of index / 49
so with % Acknex returns an integer remainder of 2 numbers