The chkdsk command stands for Check Disk. The chkdsk command checks your disk for errors. It can also fix logical file system errors on the disk with the command chkdsk /f
The command chkdsk /r will not only check for logical file system errors (like chkdsk /f), but it will also find bad sectors on the storage drive. If any bad sectors are found, it will also attempt to recover the data in the bad sector and write the information to a known good sector.
The chkdsk command can only be used on a drive that is not in use. So for example, if your drive has an operating system on it that is currently in use, the chkdsk command will fail to run and will ask if you want to schedule the volume to be checked the next time the system restarts.