My friend boots Linux from an external hard disk (500 GB). My question is he installs the operating system for one particular motherboard processor; the system may have additional stuff like a graphics card, etc, etc. What if he plugs this disk to another completely different machine and tries to boot. Will the OS load/boot?
It depends on the OS, and how it is setup.
For my portable Arch Linux installation I made sure to, in the boot loader, address the disk by UUID (instead of /dev/sdX) so it would always find the correct disk when trying to boot in a different machine with different numbers/arrangements of disks.
Linux installations are specific to a processor type. An amd64¹ installation will only work on an amd64 processor. An ix86 installation will only work on an i386 processor (but all amd64 processors are ix86-compatible). A powerpc installation will only work on a powerpc processor. And so on.
Beyond that, unless the installation has been tweaked in a way that's irrelevant to ~99% of Linux users, there's only one setting that might depend on the hardware: many systems need a specific video driver to take advantage of their graphics card. If the system on the drive is configured to use a driver for the wrong graphics card, or not to use a driver that the graphics card requires, the driver may be ignored, and the GUI may not appear (you'll just get a text mode login prompt).
¹ amd64 means “64-bit PC”. Intel makes such processors as well as AMD.
It might boot but run the hardware in some sort of standard mode - for example running the graphics card at a low resolution with no accelerated 3D graphics.
Or it might not boot at all.
For Windows XP it will probably detect the graphics card and other peripherals as new hardware and try to load new drivers, but might not boot for a new motherboard. It will mean that when you plug the hard drive back into your original machine it will try to load new drivers again.
For Linux I'm not so sure, but it might work more often than not.