Definition
NameID is the SAML 2.0 element identifying the authenticated subject — with formats including EmailAddress, persistent, transient, X509SubjectName, and others.
In more depth
The NameID value is the user identity the SP sees. Format options change the semantics significantly: EmailAddress is human-readable; persistent gives a stable per-SP ID across sessions; transient changes every session.
Most SaaS apps default to EmailAddress format. Some (Salesforce) use Federation ID for exact matching. Mismatch between IdP NameID format and SP expectation is one of the most common SAML setup failures.
Want the work, not just the definition?