If you’re upgrading to Windows 8 or even Windows 7 Home, Windows XP Mode is not included. If you really want to use Windows XP in a virtual machine, you’ll have to get a boxed copy of Windows XP—if you have an old one, that will work—and install it inside a virtual machine. You don’t have to buy virtual machine software—the free VirtualBox andVMware Player will both work fine.
Virtual machines will allow you to run most types of Windows XP applications, but not all of them. If an application needs direct access to a piece of hardware, it may not work.
Note that Microsoft is also ending support for Windows XP Mode and Windows XP in virtual machines on April 8, 2014. However, if you have to run Windows XP, running it in a virtual machine on a modern version of Windows is much more secure than running Windows XP as your primary operating system.