You had two drives in the desktop?
You have to remove the drive that failed. The Master/Slave thing works for drives that are functional. If a drive fails, its behavior is not predictable. You have to fully remove the drive, at least electrically. No cables connected to the bad drive.
The BIOS would recognize the second drive and let it be the boot drive. But you must set priority to look for the CD first. When you let the CD boot you should see a message...
Press any key to boot CD...
You have to hit a key withing a few seconds.
You may need the product key at had, in some cases.
Full install may take over an hour. You will be prompted for some information at more the one point. So you can not just walk away.