1.
“Wherever possible, faulty bits in a particular sector would be corrected by the storage device”
“The sector is corrected on the SSD before it is transferred to the OS. The ECC feature in the SSD firmware can detect and correct a certain number of flipped bits.”
Would it change / correct the stored file on the drive?
Or what is corrected, and where?
The assumption is yes, if an SSD (or any storage device with ECC) detects an error that it can correct, it will correct the data. Otherwise the computer is wasting cycles realizing the data needs correcting every time it's read.
As for what is corrected and where, it depends on the error correcting method used. For example, if the storage is using Hamming Codes, the amount of bits that can be correct depends on the number of bits set aside for error detection. If the device is using (4, 7) Hamming Code, only a single bit can be corrected. If more than 1 bit is incorrect, then the system can still flag a problem, but there's nothing it can do about it.
2.
How can it tell that the bits are flipped? It compares it with another file that is identical?
The most basic principle is using something called parity. This counts the number of bits that have a value of 1. A bit is used to mark if the number of 1's is even or odd (it depends the protocol). However, this has limitations. For example if the parity bit is detecting an even amount of 1s, then two 1s can flip to 0 and the system won't think anything is wrong.
Another method is to add the values of the data together in some form or fashion before sending it, called a checksum. Then the receiver does the same adding and checks the result. If the result isn't what's expected, then the system knows
something happened, but it can't tell what.
Another option is error correcting code, like the aforementioned Hamming Code. Hamming codes can detect where a bit has flipped. But also as mentioned, there are limitations to this.
And while you could have a copy of the data, you need at least 3 total copies of this data to be effective. If you only have 2 and one of them gets corrupted in a way that the above doesn't catch anything, how do you know which one is the correct copy? Having at least 3 makes it so a consensus is easier to determine. However, this is an inefficient way to store data for events that are rare. But if you absolutely need data reliability, then yes, this method works when used with the other methods.
3.
CRC checksum
Whats happens if it doesn’t check out /gives same result?
All you can tell is the data has been corrupted.
4.
What can cause flipped bits?
Only tranfer and copy errors in RAM?
If you somehow damage internal parts?
Damage to the parts, power droops or surges, RF emissions causing a voltage spike, cosmic rays hitting spots in hardware.... There's a lot of things that could happen.
5.
After I have copied a file to an external drive, I run the fc /b command on the two files
The fc /b command is a guarantee, that no bits are flipped, corrupt etc.?
I wouldn't say this is a guarantee. From when the data is picked up from the drive to the time it arrives in RAM and processed, anything could've happened. However, it's reasonable to assume that if your computer is working more or less fine, that this process is reliable enough to be trusted.