The latter. It sounds like you ended up trying to install Ubuntu over top XP, and things didn't go so well. Now you get to wipe everything clean and reinstall. So a tip to get you started is to use the copy of Windows you have working to download all the necessary drivers and the XP service packs as well. I'd go with the offline "network professional" versions just so you don't have to be connected to the Internet. A "virgin" XP install can be compromised in minutes of being exposed to the Internet, so if you can get to at least SP3 level before connecting to the Internet, it will buy you a lot of additional time to get the remaining updates installed.
I had tried to install ubuntu without creating a partition by installing from iso usin a flash drive after that i restarted my comp after this the computer never booted it keeps saying invalid partition so i downloaded a software called wintoflash n tried bootin it from flashdrive it boots n works fine but when i go to boot menu n select harddisk it does not boot says invalid partition n i have to plugin the pendrive n select it to boot.Please is there a way that i can boot it from my harddisk or do i have to format all drives a install XP all over again.