Running chkdsk /f/r should do this, but on a large drive ti will tke a long time, or you could run a full format which will flag bad sectors and make them unusable, but it wipes out all data so a Full image Backup of your OS.
Again it could take a few hours depending on the size of the Drive
Note that chkdsk /r implies /f so you only need to enter chkdsk /r (enter chkdsk /? for details). Note the required space before the "/". As SS noted, it can take a long time to run and often appears hung. So I generally start it before going to bed and let it run. On very large disks, it can easily take over 24 hours.
You might also visit the drive makers site. Most all have diagnostics programs for their drives.
Depends to start with on the nature of the error. "Soft" errors in which there is some corruption of the data stored are transient and will go away when that part of the disk is rewritten. "Hard" errors occur when there is some physical damage to the disk which makes a sector or group of sectors unusable. This sort of error is permanent and cannot be "Repaired". The sectors concerned are flagged as unusable and alternative sectors are used. Hard errors may be just a one off problem, due to wear and tear or physical damage but they may also be a warning of more long term problems and ultimate failure so it's worth running a regular check on disks which report a problem. Also worth stepping up your backup activity!