dx and dy are the changes in x-position and y-position between each bullet. Takes the x-distance (and y-distance) between the two points ( (|x|) is absolute value of x) difference in x-position (and y-position) between the two points and divides it into n-1 chunks.
Say the second point is 60 pixels to the right from the first point, and 80 pixels downwards, and you want to make 21 bullets. Then dx is 60/20 = 3 and dy is 80/20 = 4, so each bullet is separated by +3 pixels horizontally and +4 pixels vertically. The loop starts by making a bullet at the same position as the first point (x1 + 0*3, y1 + 0*4) = (x1, y1) and it increments to put bullets (+3, +4) away from the first point, (+6, +8) away, (+9, +12) away, and so on until it eventually reaches the second point. You can see by looking at the picture that if you do this it makes a line.