pfx is a file format containing public key together with the private key for encryption and chain of trust certificates attached to the public key if such a chain exists. Pfx files are protected by a password to access.
PKCS#12, that is Public-Key Cryptography Standard number 12, allows all the identity informations to be encrypted in a single cummulative carrier to be utilized and exchanged. That carrier is the pfx file that includes the public key, the private key, and attached certificates and identities accompanying them.