1. Windows XP. If the operating system came "preinstalled" on the laptop and you're using the original hard drive, there may be a "hidden" recovery/restore partition to restore the drive to its "shipped" state. Generally, this would be the operating system as it was "delivered" without any of the programs or data added by you. On the other hand, sometimes the manufacturer permits you to restore the operating system while preserving your user data.
For a nominal fee, some manufacturers will ship you the recovery/restore discs which may also be used to restore the disk to its delivered state.
If they're really nice, they might even be able to provide an OEM Windows XP Pro Install CD (better than recovery/restore discs), that may be used to reinstall the operating system.
2. Vista. Per the link specified by Broni, you should verify the laptop is adequate for Vista before "wiping" Windows XP.
a. How old is the laptop?
b. How much system RAM does the laptop have (among other considerations)?