|You can effect a temporary solution by reformatting the drive. Reformatting will mark the bad sectors as unusable and will stop them from being used by the Operating System.|
However, once a drive starts showing bad sectors it is time to think about retiring it and getting new one.
Modern hard drives have a section set aside for re-mapping bad sectors. This is done invisible to the user by the drives firmware. Once this section is full then they start to show and it is time to do something about it. Although you may only see one or two bad sectors, you can be sure there are others that you don't know about and there are likely to more to follow which could result in data loss.