Perform a Repair Installation
As above, don't forget to set the optical drive as first boot device in the bios or you won't get anywhere.
XP right? If so, you put the disc in and it should be one of the options that comes up, If not, select Install XP, whic i believe is the fist option, then it'll ask what you want to do.
Your optical drive is your CD drive. Set it to boot before your hard disks. Getting to the desktop doesn't matter because you will be doing a repair install.
Once you set the optical drive to first boot did you insert the XP cd, reboot and "press any key to boot from cd" when prompted?
This is a custom pc with an XP cd yes, and not a brand name pc with a restore disk?
My last suggestion would be to put the drive into another computer as a slave and (hopefully) back up your data though i don't fancy your chances much if it is indeed the file system that is corrupt.
When you say "I tried to access the files and programs in the corrupted drive but can't access it" could you see the files/folders? Did you get an access denied message or were they simply just not there?
Worst thing that could happen, you lose all your data unless you can afford to use a professional data recovery company.
Custom pc, yes that is what I meant. Brand name pc, Dell etc.