The login application initiates a PAM session by calling pam_start(3PAM) and by specifying the login service.
The library searches for login entries in the pam.conf file.
For each module in pam.conf that is configured for the login service, the PAM library calls pam_sm_authenticate(3PAM). The pam_sm_authenticate() function is part of the PAM SPI. The pam.conf control flag and results of each call determine whether the user is allowed access to the system. This process is described in more detail in PAM Configuration (Reference) in System Administration Guide: Security Services.
In this way, the PAM library connects PAM applications with the PAM modules that have been configured by the system administrator.