Normally, a PKCS#12 file is protected by a password that is needed to unlock (decrypt) its contents. To load the file you must supply the correct password.
If the PKCS#12 file contains a private key (most do), you will be given the opportunity to set a password to protect the key.