An invaluable book, originally published by Addison-Wesley (who have released their copyright -- their version of the book went out of print in the 1990s). The book describes itself as "a TeXnician's reference", and covers the way TeX (the engine) works in as much detail as most ordinary TeX programmers will ever need to know. A printed copy of the book may be had (for a modest price) via lulu.com (see the package home page for details).