It depends on what the manufacturer provided when he built the PC. The best give you the original Windows XP CD with it's product code so you can re-install at any time. The next level down is a Recovery CD which puts your PC back into the condition it was in when it left the factory. This CD does not contain the complete kit of parts. It requires a directory to be present on the PC with the remaining parts of Windows plus all the in-built software you got when you bought the PC. The worst option of all is that you get nothing with the PC.
To recover using the Windows CD is easy but you will also need to re-install all your software. You will also lose all your personal stuff so you need to create backups of that on a regular basis. The same thing applies in the second scenario where the PC is put back the way it was. Your only hope in the third scenario is that you have installed and run some proprietary sotware that will have given you a complete backup of your hard disc.