A working Windows system is only required to run Ubuntu if you install Ubuntu inside Windows using Wubi. (Even then, the Windows system can be pretty badly broken without affecting the Ubuntu system at all.)
So yes, all you have to do is to download an Ubuntu ISO image on another machine, burn it to CD/DVD or write it to a USB flash drive, and then boot from the CD/DVD/USB on the machine where you want to install.
However, if there are files on the old computer you want to recover, it's advisable to do that first. Typically, the Ubuntu installer will give you the option to install alongside existing systems, which resizes their partitions while keeping the data intact. There is always a small (but significant) risk of data loss during dynamic partition resizing, though. The risk is probably increased in this scenario as there's a chance that what's wrong with the Windows system is related to filesystem corruption (which could contribute to a situation where dynamic partition resizing fails and is unable to fully recover the old state).
Perhaps more importantly, you probably do not want to keep the old Windows XP system. Unless you plan to attempt fixing it, it does you no good. So you'll probably want to tell the Ubuntu installer to install over the existing operating system instead of alongside it. This will get rid of the XP system and all files in it, so if there are any documents or other important files in it, you should offload them first.
Conveniently, you can do this from the Ubuntu install CD. Boot the live CD/DVD/USB flash drive and select Try Ubuntu instead of Install Ubuntu. Open a folder window and find your Windows partition under Devices. Click it to mount it. Now you can browse and view your files there, and offload anything important.
You cannot copy the files to the desktop on the live CD/DVD/USB, as that's just stored in memory--when the machine shuts down or reboots, everything there goes away. Instead, depending on their size and the resource available to you, you can put them on an external hard drive or USB flash drive (other than the one you're using for installing), email them to yourself, use an Internet file storage service like DropBox or Ubuntu One, transfer them to your other Windows machine over the network (Ubuntu supports sharing files with Windows systems), or burn them to a CD/DVD.
Once you've offloaded any files you wish to keep, just double-click on Install Ubuntu on the desktop, and tell the installer to install over existing operating systems (not alongside them).
Specifically, the option to select is to install to the entire disk.