openssl pkcs12 -in file.p12 -out file.pem
From the OpenSSL PKCS#12 Program Usage page:
This will dump all the keys and certificates in the PKCS#12 file to a file named file.pem. It will ask you for the password to decrypt the PKCS#12 file and the pass phrase to encrypt the output private key with.