How to auto restore Windows XP?

Hi,
Normally I used to restore windows xp after installed new software or detected major virus inspection and does it cause any bad effect to my computer (long-term)? If this practice is advisable please tell me how to auto restore windows xp after installing new software?
