Loopindex is the index of the loop. %4 means the remainder after dividing it by 4. So the result is 0,1,2,3,0,1,2,3,0,1,2,3....
(loopindex%4)*300 is the X offset for each of four columns, first column will be at x=0, second at X=300 etc.
int(loopindex/4)*200 is the Y offset for each row. Each row contains 4 records and placed with 200px intervals.