Sony has a FAQ page up about everything
https://www.playstation.com/en-au/get-help/help-library/my-account/access-and-details/information-about-2-step-verification.psvita/
When you need to sign-in with 2SV
You need to sign-in with 2SV:
When you first sign-in to PSN after enabling 2SV.
When you sign-in to PSN after signing-out.
Every time you sign-in to PSN if auto sign-in is switched off.
Occasional security checks when signing-in on web browser/PS App.
You do not need to sign-in with 2SV if:
2SV is switched off.
Automatic sign-in is enabled and you have previously signed-in with 2SV.
If you are signed-into PSN and you are accessing account management (you only need your account password).
If Password at Checkout is switched on and you are making a PlayStation Store purchase (you only need your account password).
Device Setup Password
If you have 2SV switched on, your PS3, PS Vita, PS TV, PSP or Xperia devices need to be authorised using a Device Setup Password before you can sign-in on them. You need to generate a new device setup password to authorise a new device or for re-authorising a device. You can use the same device setup password every time you sign in on that device.
Backup codes
If you can’t receive a verification code, you can use a backup code to sign-in on PS4 or web/PS App. Make sure you keep a copy of your Backup codes in a safe place. See our ‘Issues signing-in’ article for more help with this.
Account password
This is your usual account password. You need it to access account management functions once you are signed in on any device and for the first step of 2SV sign-in on:
PS4,
web browser,
PS App, or
Bravia.
You do not need your account password to sign in on any other device - only the device setup password.