CHKDSK is not very good at recovering data, but it does get hidden help from the HDD unit itself. Modern HDD's have significant smarts built into them that Windows does not actually see. When the HDD is asked to read a Sector, it checks the data it gets for validity (checksums and the like) and also for the quality of the signal levels it receives. Note that checksums cannot be used to regenerate damaged data from a Sector - they merely tell you whether the data retrieved is valid or has errors. If the data checks say no problems, no action is needed. But if the data has errors, OR if the HDD is not satisfied that the signals are clean, the drive's on-board smarts go through an attempt to recover data. This may include multiple re-reads of the Sector and some work to assess the signals and get good data from them. If this all succeeds, the recovered good data are written to a replacement good Sector (the HDD itself has a semi-hidden stock of unused known-good Sectors) and the faulty Sector is marked off as unusable. Then the data are fed back to the OS that requested it, and no further action is taken. Most of this checking and data recovery attempt is completely unknown to Windows. Only if the data recovery effort fails does the HDD tell Windows it cannot delivery good data and a read error has occurred.
Now, if CHKDSK gets a Read Error reply from the HDD, it requests a re-read. It will do this several times before giving up. Each re-read request actually triggers that same on-disk process. But note that CHKSDK itself has no process to recover data. It can only ask the HDD to try again a limited number of times. If, in the end, even that many requests from CHKDSK fails, then CHKDSK considers that Sector to be a Bad Sector. It logs that into its own file on disk listing Bad Sectors so that Windows will never use it again. Then it asks the HDD to assign a new clean Sector to that position in the file in use so that the file can still be read. The problem here, though, is that the new clean Sector assigned contains random data - CHKDSK never had good data to write to it. So the resulting file, although readable, contains corrupted data. In some cases (for example, a simple graphics file or a text file) you may be able to open the file and manually edit it to restore the lost info. In many cases, however (for example, an .exe file that is part of the Windows OS or of an application software package), the only way to recover from this problem is to find another good copy of that file and use it to replace the corrupted copy.