My guess would be that whoever gave it to Goodwill did not want their data available to whoever bought it so they deleted the drive or just removed the drive.
First you need to make sure that it has a harddrive. If it does, partition the drive, format it, and then put a Master Boot Record on it.
I would think that if the CD drive works, that the computer would see the Windows XP CD in the CD drive and would help you do all of that. If it does not recognize the Windows XP CD when you start the computer, look in the BIOS settings and make sure that the CD drive is set to boot before the harddrive.