There are many ways to authenticate a user. The most common pattern nowadays is through the username and password, but we also have the third-party sites' authentication (Facebook login, Twitter login, GitHub, and so on), which sometimes uses OAuth or their custom method. LDAP is also a popular option in the enterprise.
Symfony's documentation already contains everything you need to know about creating a custom authentication. However, it is hard to understand why you are doing things in a particular way when following the official guide. This part guides you through the same process, while detailing the reasons why things are done in such a way, and how each part connects with each other.