IMO, the link that Budapest supplied...is the one that you want to follow.
A USB flash drive is just another storage medium, same as a CD/DVD/hard drive. The differences involved for booting from each...relate to any system's capability to read data and boot from each. All of these devices can be made bootable, under the right circumstances...and each of them is capable of having Windows XP stored on it, ready for installation on a given system.
The possible stumbling point is whether or not the system in question supports booting from the desired device.
Just about every system can boot from hard drives and CDs/DVDs...but not every system can boot from a USB device. Older systems or motherboards may not have this function...or may not have it set as a default. To determine whether one can boot from a USB device, any user must go into the BIOS (Setup) and look at the settings.
Every BIOS can be a little different in terms of the options presented and the way that they are presented...so it's hard to give specifics on what setting (if any) to look for in the BIOS. On my systems, there are two options presented...one is worded "USB legacy support for DOS", while the other is "USB support for Windows".
The one which emphasizes DOS is the only one that enables USB devices to boot on my systems.
Creating a bootable medium is s 2-stage process. First, the files which allow booting must be loaded on the device...then the files which take over after booting (XP installation CD) must be copied to the device.
Personally...I think that it's much easier and safer to just use a CD (you can always burn a copy of any XP install CD and it will work effectively, just as the old/original worked) than to put the XP install files on a USB device and complicate an install procedure that is designed to run from media which are (almost) universal on every system.
But I'm lazy
and prefer a harder media (CD) to a soft, corruptible, more volatile (subject to corruption/failure) media such as USB devices offer.