It works exactly the same as a CD except that it's faster. (at least from what I noticed). But you have to have a motherboard that supports booting from the USB of course. But you'd have to have a pretty damn old system if it doesn't support that.Never liked the idea for installing OS via usb devices, best to burn it into a disc media format or mount it.
Windows 7 has "Installing from USB" enabled by DEFAULT. So you don't have to prepare anything, you just put it on the drive and boot from it. No strings attached. Windows XP was trickier though back in the days, since they had no support for that kind of stuff yet.
It's also much easier to carry around with you, instead of having to drag a disc around.