Recovery CD for win xp

so my old computer crashed a few weeks ago, hence why i quit cf, but i was wondering about recovering it with the windows cd, I was wondering which cd i needed to recover my windows and get it working again since i can't even get into safemode after it boots, (just loads to a black screen), do i just need a windows recovery cd or also some other cd's, and i was wondering where i could buy the cd i needed because my computer didn't come with one, but i do have the cd code on my computer.