Salesforce Lightning:
To get security token in Salesforce, go to Setup –> Personal Setup –> My Personal Information –> Reset My Security Token.
Salesforce Classic:
1. Go to My Settings.
2. Select Person -> Reset My Security Token and click “Reset Security Token” button.
Note:
1. You will receive the Security Token through email.
2. You cannot login as an user and generate.