Windows xp will use and see all of your cores, whether you have 2, 4, etc
same for Vista
The usage or gain from that potential is up to you. For example, if you buy a quad core cpu for your grandma to surf the net or email, the os will not deliver any real gain from multi cores.
If you have a quad core and intend to just do gaming, even hardcore gaming, you may not realize or allow the OS to realize the potential of all of the avialable cores.
If you want to get an os that will utilize all of the available cores, because you run math intensive apps, multi task, do video editing, partake in "folding" or other distributed computing...etc etc etc...you get the idea.
XP or Vista and a dual/quadcore will benefit you at the base level by the quickness or efficiency of running the OS, anti-v, firewall, other apps upon system startup. Those will be immediate and obvious...but after boot up, if you don't do much...it won't help you.
I don't game much, but I multi task. Current gaming development and most general application development does not code for multi core CPUs (games and gpus are another thing).
Think of it like you building "Superman", you get all the ingredients together, put it all in a test tube...out pops Superman, but instead of letting him try and save the world you want him to play a round of Mahjongg with you. I also play Mahjonng on Vista.