You can do this by editing
sudo nano /etc/default/grub
You can change the value for
- a certain number, which is not recommended, because the menu entries can change,
- a string like
"Windows XP" or however the entry for Windows XP is named; or
- save the last used entry with
GRUB_DEFAULT=saved and adding
after you have made the changes, press Ctrl+o to save and Ctrl+x to leave. Then run
sudo update-grub to apply the changes.
I recommend the last option, it's the least annoying option in most cases, unless you boot into another OS each time you reboot.
See also the community documentation for Grub2 and Grub2/Setup.