There are multiple types of two factor authentication, some more secure than others. One of the more secure variants is the app based one. Once setup, the app will constantly generate new 6 digit codes that you'll need to enter to unlock your account. Thus the only way to login would be to have the device with the app installed on hand.
[For additional protection, you can leave the device on airplane mode (with wifi off) as the app doesn't require an internet connection]
This however poses the risk of being locked out of your own account incase something were ever to happen to your device.
During the setup of two factor authentication, you'll be given the prompt to scan a qr code. Just scan that code with two devices. And that's all it takes to setup a backup device.