I am using Samsung 1TB HDD and it has many bad sectors. is there any way to repair that? I don't know if it is logical of physical.
You can follow the available guides:
If you have a large amount of bad sectors, I would start planning ahead to get a new drive.