If you are discarding the drive, the most secure method of file deletion is to remove the drive platters and destroy them (grind-up the platters, or the ever-satisfying fire method).
Unless its mram or intels new cross point memory. However those are not widely available yet and definitely not available in consumer hands
Now if you are erasing a hdd then a program like heidi's eraser or spider will do the job. Heidis erasure method has a guttman. However it could take easily over a week to complete. As cheap as drives are i would just send drill bits through the platters.
For solid state drives, a f-disk erase partition with a complete slow format will zero all the bits except the bad cells. If the cell went bad the chance the cell contains sensitive information is small. The drive mfg however will likely have a secure deletion program which will overwrite even the bad cells. If the drive is enceypted, deleting the security key will make the data unrecoverable in 99% of cases. However there's a few ssd drives with encryption flaws which can be exploited.
That said if you are selling or recycling this computer's hdd for someone else, a simple random pass then 0 wipe write will stop all but the most advanced labs. Densities are so tight the old method of voice coil adjusting the track to read the edges isnt as viable as it used to be.