The bad sectors develop due to sudden jerks while the HDD is operating and the head bumping against the platter, damaging the surface. The hard disk platter at that location loses its magnetic properties and the area becomes defective.
Hence even though the head tries to write data on that sector, the data is not recorded correctly on the bad sector. During the verification process, the disk identifies this bad sector and will mark it as bad and will try to move any readable data out of the bad sector.
In subsequent writes, the cluster containing the bad sector is always skipped whenever the hard disk tries to write a new file in this location.
Once a defective sector is marked as bad, the hard disk will avoid this bad sector in all the disk operations.
Chkdsk program tries multiple times to read the information already written on the bad sector and tries to recover the data.
As the bad sector is a phisical error on the hard disk platter, this error is local to this hard disk only and will not be passed on to another good hard disk.
You don't have to worry about bad sectors filling the good hard disk from a bad hard disk.