Assuming your windows is XP or Vista, and your bad sectors are on the "c:" drive,
go to Start - Run... and type "chkdsk c: /r" and, if you are told that the drive cannot be "locked" just agree to schedule the scan for the next restart. When you are ready, restart your computer.
Note: this does not "remove" bad sectors, it permanently tells your computer to look around them as if they did not exist. Any files that were located in those sectors will probably be lost, but if you are lucky, chkdsk will recover some of them.