Before I begin: I'm still a noob with Linux, I'm just speaking from my own experience. The below worked on my two computers, a five year old desktop and a netbook. They will most likely work on yours, too, but I can't guarantee anything.
Well, if your XP is unbootable anyway, it can't hurt too much, right?
If you want to put Ubuntu on a flash drive, you're going too need a few things. First is (pretty obviously) a flash drive. It needs to be around 1 gigabyte or more in capacity.
If it's large enough, you can also put a
persistent file on it. This is basically a file where Ubuntu will save your settings, programs, and files. This is just for the live flash drive, of course - after (if) you install the real thing, they will be saved wherever you want, like in Windows.
Then you'll need the Ubuntu .iso disk image. You can grab that from the Ubuntu official website (
ubuntu.com) or use an automatic downloader (more on that in a second).
The final thing you'll need is an app to put it on the drive for you. I recommend
UNetbootin. Among other features (which you may or may not find useful) it can automatically download the disk image for you or use one you already have.
Great, you're ready to go! Start UNetbootin and put Ubuntu on the drive - it should be pretty easy to do.
Once UNetbootin finishes, take the drive out and put it in the computer you want to use. If it's on, shut it down and start it again; if it's off, just power it up.
If you're lucky, UNetbootin will show you a menu. Just select the option to start Ubuntu, and it will boot. Go make a sanwich or something, because it's going to take a while.
If you're not, and Windows starts, shut your computer down again. Power it up again. As it starts, look for a key to 'enter setup' or 'BIOS settings', or something similar. Press it, and look for 'boot order'. Make sure the flash drive is first, and restart your computer
After Ubuntu starts, you'll get its desktop, with an 'Install Ubuntu' icon on it. Ignore it, just play around. If you feel ready, use it to install the thing.