My operating system need to reinstall again and again

I have Intel Pentium 4 pc with 3.00 Ghz processor, 2GB ram and 160 GB harddisk space.
My problem is my operating system need to reinstall again and again. After i install windows XP some days its running good.
But after some days its became slow and faces many problems. Is this problem of my harddisk or my ram or motherboard.
Experts answer me please.
Thanks is advance.
Have a great day
