You'll want to refer to the Portage Manual, as masking is a form of hiding ebuild files for testing. Once those ebuilds have been fully tested to work, they are unmasked, and can then be installed on the machine.

The file that masks other ebuilds is in /usr/portage/profiles/package.mask, but for further information, I advise on reading the Portage Manual linked above, as it'll explain far better than I can.