Here is a line from (2,2) to (19,9). You can see that it has a bit of a wiggle to it.
Here it is magnified, and the reason for the wiggle (called the jaggies) becomes apparent.
Notice the steps, these are caused by trying to draw a diagonal with squares laid out in a coordinate system. These squares are aliased from the position of the line in that colnmn. The white squares are the centers of the pixels.
The C code that drew this line is written for the special case of lines in the first octant. A line can be draw here and then mirrored to provide generality.
The points that are plotted generated by the algorithm.