I/o error how to resolve issue?

I have a my book 1tb external hard drive and every time I try to initialize it I get an I/O error can anyone please tell me what this mean and how I can resolve it … it was used and given to me by a friend … my computer recognizes it and even gives me an icon of it but I cannot open it or view it and the disk management tells me its there but has no info on it other then it has a recovery partition and I cant even change that through cmd so I am kinda lost and appreciate any feed back thank you

Hello,

I/O error usually means the drive is defective and needs to be replaced. However, I recommend you try writing zeroes to the drive using WD DLG.

Data Lifeguard Diagnostic for Windows

If this does not work then it means the drive is dead.

ok how do I do that??

it tells me delete partition error