It will vary from game to game, some Windows 9x games work perfectly fine on XP without much trouble. Some games require either an official or fan made patches to work properly on XP, and some games won't work at all or will run with some serious bugs and there is little that can be done about it. You would have to research the specific games you want to play to see if they will work.
Most of the time they will work, but some games do have issues with XP and newer eg. MechWarrior 2: Mercenaries Titanium Edition (won't launch) MechWarrior 3 (physics bugs and general instability), The X-Wing Collector's Series (will crash to desktop if 3D acceleration is enabled unless you download a fan-made patch)
The problems tend to be with X-Wing Collector's CD and TIE Fighter Collector's CD when 3D acceleration is enabled, like a said, there is a patch to fix the issue, but it won't work straight out of the box.