New/Old hard drive? computer make & model? or at leat motherboard make & model?,.. If it's a new homebuild or new motherboard, enter the BIOS and configure IDE Mode, IDE Native, or IDE Legacy.. depending on what the available setting is named.
If the Hard Drive is used, disable the BIOS S.M.A.R.T (Self Monitoring Analysis and Reporting Technologyetting), and also the IDE setting.
If it still doesn't detect the Hard Drive, if the HD is older and you suspect it may be dead, install another HD that's in known good condition, as the main HD. This can help the bad HD run so you can rescue and backup your personal information before discarding it.