I seem to recall that the now-ancient
first edition of Foley and van Dam I studied ages ago had a really great explanation, but since I haven't read it since, oh, 1993 or so, I can't recall it very well. There is a
new 3rd edition, however, from just three years ago, and I am guessing that part won't really have changed - though the prices for it are rather steep.
I should also mention that there are other
line drawing algorithms which actually perform better on average than
the original version of Bresenham (though most of these are based on it), and others (such as
Wu's) which do better in terms of appearance.
Wikipedia wrote:While algorithms such as Wu's algorithm are also frequently used in modern computer graphics because they can support antialiasing, the speed and simplicity of Bresenham's line algorithm means that it is still important. The algorithm is used in hardware such as plotters and in the graphics chips of modern graphics cards. It can also be found in many software graphics libraries. Because the algorithm is very simple, it is often implemented in either the firmware or the graphics hardware of modern graphics cards.
The Bresenham algorithm has held on because, a) it was the first really efficient line algorithm, so everyone ended up hearing about it, b) it is indeed very, very fast, and had minimal memory costs, so it worked well on early home computers in the 1970s and 1980s, c) it is a simple enough algorithm that even someone who doesn't completely understand it can muddle through implementing it, d) it is well-suited to hardware implementations, as well as ones in ROM or some other type of firmware, and e) it can be generalized to work with
circles, ellipses, and several other types of curves.
The Wu algorithm is apparently a bit more complex, though
this explanation might help if you want to look at it, too.
The Wicked-Pedo article on line-drawing algorithms in general also mentions the Gupta-Sproull algorithm, but apparently there isn't a separate article on that. It is easy enough to find a few pages on it
via a web search, however, such as
this one and
this one, and
this paper discusses it's efficiency, but my impression is that for line drawing, it isn't any better than Wu's, and possibly worse. However, from what I've read, the line algorithm is actually just a specific application of a general anti-aliasing algorithm, so if you are doing more than just drawing lines, it might make more sense to use that algorithm (or some similar one) regardless of performance.
Dunno if any of this helps you understand the Bresenham algo, though.
I will point out that, if your goal is to implement for your OS, you might be better off focusing on your GPU driver instead - as the Wicked-Pedo article quoted earlier indicates, almost all of the major GPUs in widespread use now (which AFAICT means both discrete GPUs such as Nvidia and AMD, and integrated ones such as Intel's or the various SoC ones) implement a version of the algorithm natively, and are likely to be a lot faster with it than would be possible at all using CPU-bound code.