Hi Manpreet,
Two-factor authentication in Salesforce is a two-step login process. In this process, once the user logs in using their username and password, a token or passcode is sent to their device, which they need to enter in order to finally log in. The user needs to download supported Authenticator app for their mobile devices. Once the admin has set up the Two Factor Authentication for that user; next time the user logs in, he will be asked to complete the second step of verification i.e. a QR code will be shown on the screen after entering user credentials, the user will then need to scan the QR code with the help of Authenticator app and enter the code generated by that QR code.
Hope this answer your query.
Thanks,
Subhendu