The Foreign Intelligence Surveillance Act (FISA) is the law that allows the federal intelligence community to spy on foreign actors. The masking process is a safeguard measure designed to protect Americans who are recorded in the incident.
When this happens, intelligence analysts are obliged to hide or “mask” the name of the American if their participation is incidental and no wrongdoing is suspected.
If a member of the intelligence community says that they need more information on the intelligence reports they are receiving about a foreign actor, they can request to unmask a person's identity.
During a hearing Senate Intelligence Committee hearing on June 7, 2017, then-National Security Agency director Michael Rogers explains the limited process of revealing the identity of Americans subject to incidental surveillance.