Here are some illustrations of various booting schemes. They will make the most sense if you read through them in order, but if you come back here and want to find a particular one, here they are:
Start at the beginning
Schematic hard disk representation
Simple (MS-DOS style) boot
Boot from second partition
Key to color scheme
Linux boot--LILO in Linux partition
LILO installed in MBR, booting Linux
LILO in MBR, booting non-Linux system
Secondary loader (boot.b) exposed
This is a representation of the partition structure of a hard disk:

So here is a typical system booting. I've simplified the picture and added software (those are the colored parts). The boot sector illustrations have been enlarged a bit just to make them more visible:

The BIOS reads the Master Boot Record into memory (1). The MBR has a list of the other partitions on the hard disk. The MBR program searches for a partition that's active.. Having found it, it goes to the first sector of that partition and load that into memory (2). That program, designed to boot the operating system which is in that partition, knows where to look or what to look for in that partition. Once found, it is read into memory (3) and executed, which is how that operating system initially starts.
Now, this is what it looks like if you boot another partition. This is what would happen if the first partition was not marked active and the second was:

Remember, "booting" is LOADING CODE. Don't think of it as "winding up in hda2 somewhere". Rather think of it as starting the operating system using files (code) found here. Now we will look at different configurations so let's color code some "DOS" and Linux bits:

Already we can guess what it will look like if we boot Linux:

This is the case of "LILO in the Linux partition". You get this when you put "boot=/dev/hda2" in lilo.conf. (MS-DOS note: 2nd partition must be made active.) Now, take a look at what you get if you put "LILO in the MBR":

This is the result of "boot=/dev/hda". Linux starts just as before, but the procedure takes a different path. Interestingly enough, the boot record of hda2 isn't used. You can read and write it, but Linux never looks at it. All the necessary information about hda2 is contained 'way down there in the MBR.
This is why Linux does not have to be installed on a primary partition.
When you use LILO in the MBR it does not care about active partitions. The partition to boot is selected by the user (you) or by default (after the timeout). If you select hda1, you get this:

Hey, we're back to three steps again! Well, non-Linux operating systems are not loaded by LILO. It's assumed that the boot sector of that partition knows what it must do to load that operating system. LILO simply hands off to it--this is what you get when you have an "other=..." stanza in lilo.conf. The "table=hda" line is used because that mimics the behaviour of the original MBR that LILO replaced: by (MS-DOS) convention, when a boot sector program is started, it receives a pointer to the partition's description down in the MBR. (make that a footnote...).
For completeness, and truth-in-advertising, I must disclose the actual load path, to illustrate one more LILO trick:

The part of LILO in the MBR is VERY small. Most of LILO is actually contained in /boot/boot.b (known as the "secondary loader"). Not shown but similarly used may be other files in /boot such as chain.b, (for the non-Linux systems) but the point is, that there is always a piece of LILO loaded from the Linux partition as part of a LILO-controlled boot process--even when you boot your "other" operating system. I think you can see that these extra arrows would just confuse things, and so I haven't shown them. Just remember they are there, in case any complicated questions arise that need careful analysis.
The software angle. The illustrations on this page depict the data that is used to get the computer booted. It does not really say anything about how the software is handled. I'll add a few details here to help complete the picture.
Every hard disk keeps a Master Boot Record on the first physical sector of the disk, and the BIOS knows this. So the first thing it does is read drive 0, block 0 into memory. The memory location is traditionally 0x7C00. Then control is transferred to it. That's fancy language for saying "it jumps to 0x7C00". Now the MBR program is running. If it's LILO, at this point just sets about the business of reading in the secondary loader. First it prints "L" Familiar? You're on the road to LILO! ! In the case of the DOS one, it searches for an active partition at the end of the read-in block. It will stuff a pointer to it into some registers before going on. Having located a partition that it likes, it must use the partition table information to find which sector to read in next. That will be the boot (first) sector of the selected partition. Once that boot sector is read into memory, the program jumps there. The result will be operating system dependent--it could be DOS, it could be someone's "boot manager". It may even be LILO, having been installed in a partition boot record.
Elsewhere, I've explained that the primary loader doesn't have a name. I've named it "LILO" (all caps). The same is true for the one you get with DOS--no name. This is the program that FDISK /MBR installs.
Subtleties: The procedures shown in figures 4 and 5 both boot Linux. But the DOS MBR program seen in figure 4 requires an active partition. LILO (in 5) doesn't. What does the DOS MBR program do when it doesn't find an active partition? Same thing it has since 1983--it attempts to jump to ROM BASIC (ohhh...Hey, I've seen that!)