It will often just work right away, especially if it's a chipset that uses the same driver set.
You can use the Repair Install option when you run the WinXP setup disc, and it's quite effective. It will restore XP to essentially the original install, with the original drivers from the disc, all the original apps included with XP, but it leaves your data files and install applications in place, keeps their shortcuts, keeps all their registry settings. You just have to download all the Windows Updates that have come out since the version on your CD. If you can find a source for the latest version on CD (with service pack 2 included) you can also just use that with the same CD key you have now. Or you can use a program like NLite to slipstream all the updates into a new CD, before you make the transfer.
You should make backups of the system first, then before your last shutdown before the swap, uninstall all the main system drivers (chipset, CPU, sound if it's onboard, network controller, any other parts you're replacing like video). That way they're just not on the system, since they won't be needed. With newer boards you may need to at least install the network driver from the disk that came with the board, in order to be able to go download the rest of them. A better idea is to download drivers for the mainboard and all your other peripherals and burn them to a CD, so you can just go in and install them.
The Repair install will however leave whatever cruft old applications left in. Usually it's not too bad, and you can run a program like CCleaner or others to remove a lot of it from the registry, and there are lots of driver cleanup programs. A completely clean install gives you the freshest system of course, but not necessarily one that performs any better or is more stable.