2FA stands for Two-Factor Authentication. The first factor everyone is familiar with, a password, which is classified as something you know. A PIN is in this same factor because it is still something you know. The second factor we are using is something you have. The thing you have is your phone and we are using an OTP to prove you have it.
Another way to prove you have your phone is to send you a text. Alternatively, another thing you may have is access to your email. I am sure you have experienced at least one of these methods before.