You can’t repair them. Once it’s bad it is bad for ever. On a hard drives, of any kind, internal and external you can run the command CHKDSK. Windows will attempt to recover your data but the block is marked as bad. This prevents writing to it in the future.