Both the MBR and a boot sector can contain a small "program" that allows the operating system to find the stuff that is needed to boot. This "program" (boot code) is only required if one partition is an active primary partition, and if an operating system is booted from that partition. The boot code in the MBR differs from the boot code in a boot sector; the MBR's boot code is needed to find the partition that has to be booted (this boot code is used by the computer's BIOS), the boot sector's boot code is needed to find the necessary files on that partition (this boot code is used by the operating system). Since the boot code in the boot sector is used by the operating system, it is different for each operating system.