Applies to: Dynamics CRM 2011, 2013, 2015, 2016 and Dynamics 365 on-premises
In a Dynamics CRM on-premises deployment, you have to decide, which authentication type you choose: Windows authentication or claims-based authentication.
To illustrate how it works, there are old blog articles from Dynamics CRM 2011, there are very helpful for current on-premises deployments:
Windows authentication: https://technet.microsoft.com/en-us/library/gg189199(v=crm.6).aspx
Claims-based authentication: external access: https://technet.microsoft.com/en-us/library/gg188603.aspx
Claims-based authentication: internal access: https://technet.microsoft.com/en-us/library/gg188601.aspx