I purchased a new hard drive for my desktop and when I try to boot up the computer with a Windows disc in the drive, it will go through a bunch of screens and ask me which partition I would like to install windows into, but after it goes through the formatting step and reboots, I get a message saying Primary Master Drive Fails. How do I fix this?
Messages like that normally means that you are unable to properly communicate with the hard drive. There are a multitude of reasons why this could happen though this normally happens when you have faulty hardware. So here's what I would do in this situation in no particular order.
While rare, hard drives sometimes are sold defective (Dead On Arrival - DOA). It happens and most places will take them back if you do the above testing.
In the future, make sure that when you post a question that you add lots of details. A hard drive and motherboard/computer model could really help us better answer your question.
Hope this helps.