Hello saurabhdua - I would suggest that you should first prepare a way of reinstalling or recovering your Windows 8 operating system before thinking about installing other operating systems on your hard drive. Your HP All-In-One probably has a Windows Recovery Partition (labelled WinRE) as the very first partition on the drive, and a partition labelled Recovery as the very last partition. The WinRE partition allows you to boot into the Windows Recovery Environment and the Recovery partition contains the image files necessary to reinstall Windows 8. This is good to have, but if either of these partitions are lost or corrupted, you will lose the ability to reinstall Windows 8.
If you have not already created recovery media for your HP system, please read this link: http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03481733&cc=us&dlc=en&lc=en#N1180 You have a choice of using either 4 DVDs or one 32GB USB flash drive to do this. This is important because it provides a way to reinstall Windows 8 that is independent from your hard drive.
Another good way to backup your Windows 8 installation is by imaging. I use Macrium Reflect to create backup images of the Windows partitions on my hard drive. You can download it here: http://filehippo.com/download_macrium_reflect
The instructions for imaging are here: http://kb.macrium.com/KnowledgebaseArticle50074.aspx
The instructions for creating a bootable Windows PE USB stick: http://kb.macrium.com/KnowledgebaseArticle50165.aspx
Note: The USB stick with Windows PE is necessary for two reasons, it allows you to boot into a rescue environment in order to restore your saved images, and it can also be used to fix boot problems if you find that you cannot boot into Windows 8 from the hard drive.
I like using Macrium Reflect for this simple reason: It can restore your Windows 8 system to it's present (or near present) condition, as opposed to reinstalling it and starting from scratch with your system in "day one" condition. This is up to you if you want to take the extra time and effort using Macrium.
Now onto other operating systems. I think that trying to install Windows XP and dual boot with your current Windows 8 system is going to be very difficult if not impossible. For one thing, I don't think Windows XP or Vista can be installed on a system that uses UEFI boot. I know that Windows 7 does support UEFI boot, but installing it and having it boot successfully is a little tricky to do. Another thing is this, even if you were successful with installing Windows XP, you may have a very difficult time finding all the XP compatible drivers that support the newer hardware in your HP All-In-One. Some XP drivers just may not exist for your current hardware.
As far as installing Ubuntu 14.04, here is a fairly good guide explaining how it is done: http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ HOWEVER, at the very end, he misses one very important step. If you look closely at the very last screenshot he provides, you will notice "Device for boot loader installation:" and "/dev/sda" is selected. THIS IS NOT CORRECT. Doing this would result in the boot loader, or Grub, being installed to the MBR area of your hard drive, and you would find you cannot boot Ubuntu. The boot loader MUST BE installed to the same partition that Windows 8 uses for UEFI boot. You will find the correct partition by examining the partition table at the top of that panel and finding the small FAT32 partition (about 260MB) labelled EFI System Partition(in Windows) or simply EFI boot(in Linux). You must select the correct partition for boot loader installation before hitting the "Install Now" button.
Please note there are alternative Linux operating systems that are based on Ubuntu. Two that I like are Linux Mint 17 and the soon to be released Zorin OS 9. Linux Mint with the Cinnamon desktop is my personal choice, but I recommend Zorin OS to people transitioning from Windows to Linux, due to the fact you can configure the desktop to look like Windows XP or Windows 7, as well as using the traditional GNOME desktop. Another bonus with Zorin OS is the fact that it has WINE already installed. If you are interested in installing and running Windows XP apps from within a Linux OS, this might be a good choice for you, and probably much simpler than trying to install Windows XP.
As far as installing an Android operating system on your machine, I am clueless. Perhaps another forum member can advise you on how to do this.