Latent and Masked defects, both are kind of defects which are not identified during testing. But they do have some difference, as described below-
Latent Defect - These are the defects in the system under test which are not identified for a log time just because the exact set of inputs or conditions has never been met.
Masked Defects - As mentioned above, these are also the defects which exist in the system under test but not identified yet by the testers. Non-identification of these bugs is due to the presence of some other defect(s), which prevents the user to proceed further or in other other as the name suggests, these defects are actually masked from other defects and so unidentified yet.